math.ceil()

Type Function
Library math.*
Return value Number
Revision Release 2022.3683
Keywords ceil, ceiling
See also math.floor()

Overview

Returns the integer larger than or equal to x.

Syntax

math.ceil( x )
x (required)

Number. A number.

Examples

print( math.ceil(0.5) )     ---> 1
print( math.ceil(-0.5) )    ---> -0