math.ldexp
From GMod Wiki
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: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Math.ldexp]Math.ldexp [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | Multiplies 0.785 by (2^2). |
---|---|
Used on | |
Code | print(math.ldexp(0.785, 2)) |
Output | 3.14 |
Additional Notes
- N/A