Even though Lua does not differentiate between floating point numbers and integers, there are some cases when you want to use integers. What is the best way to covert a number t
why not just use math.floor()? it would make the indices valid so long as the numerator and denominator are non-negative and in valid ranges.
math.floor()