Type Function Library math.* Return value Number Revision Release 2022.3683 Keywords floor See also math.ceil()math.round()
Returns the integer smaller than or equal to x.
x
math.floor( x )
Number. A number.
print( math.floor(0.5) ) ---> 0 print( math.floor(-0.5) ) ---> -1