Answered by
5 years ago Edited 5 years ago
Namaste it is i, dual
Normally I would write a really in-depth answer to any question I answer, but this one requires less depth so I'll keep it short.
There are 2 basic methods to do this in the math library
(https://developer.roblox.com/en-us/api-reference/lua-docs/math)
These are math.floor()
and math.ceil()
.
math.floor()
cuts off the decimal, and return the CURRENT integer
Whereas math.ceil()
cuts off the decimal, and returns the NEXT integer
Of course, if neither of these suits your tastes, you can always create your own rounding function, however I believe math.floor()
is what you're looking for.
You can read more on Lua's math library here: http://lua-users.org/wiki/MathLibraryTutorial
That is all