MathLib.ldexp function

MathLib.ldexp takes as input a numeric value and an exponent that represents a power of 2. The function returns the value of the expression times 2 to the specified power.

Package

eglx.lang

Syntax
static function ldexp(value float in, exponent int in) returns(float);
value
Takes a numeric value.
exponent
Takes a power of 2.
Example use

After the following code runs, the value of result is the product of the first argument times 2 to the power represented by the second:

// result = myMultiplier * 2**myExponent
result = mathLib.Ldexp(myMultiplier,myExponent);
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.