ceiling

Purpose

Round a number up to the nearest whole number.

Syntax

returnedNum = ceiling(numFlt)

returnedNum - type: number
numFlt - type: float

Returns

The smallest whole number that is greater than or equal to the given number.

Remarks

Analogous to the ceil function in C/C++. Rounds toward positive infinity, so the ceiling of a negative number moves toward zero.

Example

@CODE
"output.txt" << ceiling(3.2) << "\n";
@@CODE

Outputs:

4

See Also

Math Functions