MathLib.floor function

MathLib.floor returns the largest integer not greater than a specified number.

Package

eglx.lang

Syntax
static function floor(value float in) returns(float);
value
Takes a numeric value.
Example use

After the following code runs, the value of result is 4.0, and the value of result2 is -5.0.

myVar  FLOAT = 4.6;
result FLOAT = mathLib.floor(myVar);

myVar2  FLOAT = -4.6;
result2 FLOAT = mathLib.floor(myVar2);
Comments

In the case of Java™, EGL uses methods in the Java StrictMath class that are equivalent to the EGL functions. This usage ensures that the runtime behavior is the same for every Java Virtual Machine.

Compatibility

Table 1. Compatibility
Target Issue
Java No issues.
JavaScript No issues.