You could use math.floor(x)

From the Lua Reference Manual:

Returns the largest integer smaller than or equal to x.

Leave a Comment