Garry's Mod Wiki

Garry's Mod Wiki

  number, number math.frexp( number x )

Description

Lua reference description: Returns m and e such that x = m2e, e is an integer and the absolute value of m is in the range ((0.5, 1) (or zero when x is zero).

Used to split the number value into a normalized fraction and an exponent. Two values are returned: the first is a multiplier in the range 1/2 (inclusive) to 1 (exclusive) and the second is an integer exponent.

The result is such that x = m*2^e.

Arguments

1 number x
The value to get the normalized fraction and the exponent from.

Returns

1 number
m, multiplier - between 0.5 and 1.
2 number
e, exponent - always an integer.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...