[Solved] Limit a Number to the whole digit?

I’ve did a bit of googling, but I’m not really sure what i am looking for lol.

I am building a calculator of sorts, that gives a number compared to a various number of inputs.

The last input takes a variable and adds 1 to it. and divides it by 15.

local count = 0

1_button = count + 1

2_button = count - 1

inside a function that triggers when any button is pressed.

total.text = (var1 + var2 + var3 + (count/15) +var4 + var5)

This makes total.text have a very large amount of decimal places.

I want it to only the digits left of the decimal.

I have no use for the decimal places, plus it looks bad.  lol

I should also note that all of the variables, are always whole numbers.

It’s just the /15 that is the issue.

Thanks in advance.

Tyler

I got it.  =P

I replaced (count/15) in my equation to

math.floor(count/15) which limits it to the whole number rounded down from any decimal place.

.99 would still = 0

On the alternative, if someone would need it, math.ceil will go up so .1 would = 1

math.round is the conventional round up or down, where .5 goes up and anything smaller goes down.

I got it.  =P

I replaced (count/15) in my equation to

math.floor(count/15) which limits it to the whole number rounded down from any decimal place.

.99 would still = 0

On the alternative, if someone would need it, math.ceil will go up so .1 would = 1

math.round is the conventional round up or down, where .5 goes up and anything smaller goes down.