Ceiling

Calculates the ceiling of a value

Syntax:

Ceiling( x )

Parameters:

(f) x: value Ceiling is calculated from.

Returns:

(f)  a floating point number whose value represents the smallest integer that is

 greater than or equal to x. (rounds up to the nearest integer#) 

 

Use this function to calculate the ceiling of a value.

Example:


; This example accepts a value from the user to calculate
; the ceiling and floor.
;
a=AskLine("Ceiling and Floor", "Please enter a number", "1.23", 0)
c=Ceiling(a)
f=Floor(a)
Message("Ceiling and Floor of %a%", "Ceiling: %c% Floor: %f%")
i.e. A= Ceiling= Floor=
25.2  26.0  25.0
25.7  26.0  25.0
24.9  25.0  24.0
-14.3 -14.0  -15.0
See Also:

Abs, Fabs, Floor, Min, Max