math.ceil()

Type Function
Library math.*
Return value Number
Revision Release 2024.3703
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