ldexp()
The mathLib.ldexp() system function takes as input a multiplier and a power of 2. It returns the value of the multiplier times 2 to the power of the specified exponent.
Syntax
mathLib.Ldexp(
multiplier FLOAT in,
exponent INT in)
returns (result FLOAT )
- multiplier
- Input can be any variable or expression that is assignment compatible with the FLOAT type (see "Assignment compatibility in EGL").
- exponent
- An integer value that you provide to serve as a power of 2.
- result
- The product of multiplier times 2 to the power of exponent, as a FLOAT value.
Example
result = mathLib.Ldexp(myMultiplier,myExponent);
// result = myMultiplier * 2**myExponent