SHIP:Sail:ceil

From Serious Documentation
Jump to: navigation, search
Function Returns Introduced Description
ceil Integer v5.0 Gets the smallest integer greater than or equal to a number

See Also:

Prototype

Integer ceil(Float n);

Parameters/Return Value

Parameter Data Type Description
n Float the number to find the ceiling value of
Return Integer the ceiling of the supplied number

Detailed Description

The ceil() function returns the returns the smallest integer greater than or equal to a number. If you visualize a number line, ceil() goes to the integer to the right.

Examples

Example Result Notes
ceil(-5.1f); -5
ceil(5.2f); 6