math.eh
Math functions. More...
Constants
Functions
Description
Common mathematical and trigonometric functions and constants.
Constant details
const PI = 3.141592653589793 |
Value of π, the ratio of the circumference of a circle to its diameter.
Special
Double
value "positive infinity".
Special
Double
value "negative infinity".
Special
Double
value "not a number".
Special
Float
value "positive infinity".
const FNEG_INFTY = -1f/0f |
Special
Float
value "negative infinity".
Special
Float
value "not a number".
Function details
Returns the absolute value of an argument.
Returns the sign of an argument.
Returns
0
if value is zero,
-1
if value less then zero and
+1
if value is greater then zero.
Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
Returns the trigonometric sine of an angle.
Returns the trigonometric cosine of an angle.
Returns the trigonometric tangent of an angle.
Returns the square root of an argument.
Returns a
n, the value of the first argument raised to the power of the second argument.
Returns Euler's number
e raised to the power of an argument.
Returns the natural logarithm of an argument.
Returns the arc sine of a value.
The returned angle is in the range
[-PI/2, PI/2]
.
Returns the arc cosine of a value.
The returned angle is in the range
[0, PI]
.
Returns the arc tangent of a value.
The returned angle is in the range
[-PI/2, PI/2]
.
Decodes
Float
value from the given bit representation.
The argument is considered to be a representation of a floating-point value
according to the IEEE 754 floating-point "single format" bit layout.
Encodes
Float
value to the bit representation according to the IEEE 754 floating-point "single format" bit layout.
Decodes
Double
value from the given bit representation.
The argument is considered to be a representation of a floating-point value
according to the IEEE 754 floating-point "double format" bit layout.
Encodes
Double
value to the bit representation according to the IEEE 754 floating-point "double format" bit layout.