MathLib.modf splits a numeric value into two components: an integer and a fraction. The integer is returned to the second argument, and the fraction is the return value.
eglx.lang
static function modf(val1 float in, val2 bigint out) returns (float);
The sign of the integer and fraction is the same as that of the input value.
After the following code runs, y is 23 and result is .5678:
x SMALLFLOAT = 23.5678; y INT; result SMALLFLOAT = mathLib.modf(x,y);
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.
| Target | Issue |
|---|---|
| Java | No issues. |
| JavaScript | No issues. |