floor()
The mathLib.floor() system function returns the largest integer not greater than a specified number.
Syntax
mathLib.floor(numericVariable FLOAT in)
returns (result BIGINT | FLOAT)
- numericVariable
- Input can be any variable or expression that is assignment compatible with the FLOAT type (see "Assignment compatibility in EGL").
- result
- The floor value of numericVariable. The return type is BIGINT in all target platforms other than Rich UI, where the return type is FLOAT.
Example
myVar = 4.6;
result = mathLib.floor(myVar); // result = 4
myVar2 = -4.6;
result = mathLib.floor(myVar2); // result = -5