Floor

Calculates the floor of a value.

Syntax:

Floor(x)

Parameters:

(f) x value Floor is calculated from.

Returns:

(f)  a floating point number whose value represents the largest integer that is less than or equal to x.

 

Use this function to calculate the floor 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%")
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, Ceiling, Fabs, Min, Max