MathLib.modf function

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.

Package

eglx.lang

Syntax
	static function modf(val1 float in, val2 bigint out) returns (float);
val1
Takes a numeric value.
val2
Returns the integer.

The sign of the integer and fraction is the same as that of the input value.

Example use

After the following code runs, y is 23 and result is .5678:

x SMALLFLOAT = 23.5678;
y INT;
result SMALLFLOAT = mathLib.modf(x,y);
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.