Function: Ceiling
Function: Ceiling

Function: Ceiling

Ceiling ( NUMBER )

Returns the mathematical ceiling of a value.

Parameters

Parameter Type Description
NUMBER VALUE(FLOAT) The input value.

Returns

VALUE(FLOAT) The mathematical ceiling of the input value.

What It Does

This function takes a numeric value and returns the mathematical ceiling of it: a whole number that is the maximum of the two nearest whole numbers. The input value is interpreted as a floating-point number.


	a = ceiling(1.25);     // a = 2.0
	a = ceiling(1.875);    // a = 2.0
	a = ceiling(1.0);      // a = 1.0
	a = ceiling(-1.25);    // a = -1.0
	a = ceiling("1.25");   // a = 2.0
×

Modal Header