math.ldexp

From GMod Wiki

Jump to: navigation, search
Function
Syntax math.ldexp( Number fractional, Number exponent )
Where is this used?
Description:
The math.ldexp() function takes a normalized number and returns the floating point representation. This is the fractional value multiplied by 2 to the power of the exponent.
Returns: Number value
Part of Library: Math
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Math.ldexp]Math.ldexp [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionMultiplies 0.785 by (2^2).
Used onNewerShared.png
Code
print(math.ldexp(0.785, 2))
Output3.14


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox