Libraries |
|
Math | Source Code |
|
|
Function Summary | |||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
| ||||
float |
|
Constant Detail |
PI
const float: PI
-
Mathematical constant π. PI is the ratio of any circle's circumference to its diameter.
Function Detail |
sin
const func float: sin (in float: x)
-
Compute the sine of x, where x is given in radians.
- Returns:
- the trigonometric sine of an angle.
cos
const func float: cos (in float: x)
-
Compute the cosine of x, where x is given in radians.
- Returns:
- the trigonometric cosine of an angle.
tan
const func float: tan (in float: x)
-
Compute the tangent of x, where x is given in radians.
- Returns:
- the trigonometric tangent of an angle.
asin
const func float: asin (in float: x)
-
Compute the arc sine of x; that is the value whose sine is x.
- Returns:
- the arc sine of x in radians. The return angle is in the range [-PI/2, PI/2].
acos
const func float: acos (in float: x)
-
Compute the arc cosine of x; that is the value whose cosine is x.
- Returns:
- the arc cosine of x in radians. The returned angle is in the range [0.0, PI].
atan
const func float: atan (in float: x)
-
Compute the arc tangent of x; that is the value whose tangent is x.
- Returns:
- the arc tangent of x in radians. The returned angle is in the range [-PI/2, PI/2].
atan2
const func float: atan2 (in float: y, in float: x)
-
Compute the arc tangent of y/x. The signs of x and y are used to determine the quadrant of the result. It determines the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta).
- Returns:
- the arc tangent of y/x in radians. The returned angle is in the range [-PI, PI].
sinh
const func float: sinh (in float: x)
-
Compute the hyperbolic sine of x. sinh(x) is mathematically defined as: (exp(x) - exp(-x)) / 2.0
- Returns:
- the hyperbolic sine.
cosh
const func float: cosh (in float: x)
-
Compute the hyperbolic cosine of x. cosh(x) is mathematically defined as: (exp(x) + exp(-x)) / 2.0
- Returns:
- the hyperbolic cosine.
tanh
const func float: tanh (in float: x)
-
Compute the hyperbolic tangent of x. tanh(x) is mathematically defined as: sinh(x) / cosh(x)
- Returns:
- the hyperbolic tangent.
exp
const func float: exp (in float: x)
-
Compute Euler's number e raised to the power of x.
- Returns:
- e raised to the power of x.
expm1
const func float: expm1 (in float: x)
-
Compute exp(x) - 1.0 (subtract one from e raised to the power of x). The result is computed in a way that is accurate even if the value of x is near zero.
- Returns:
- exp(x) - 1.0
log
const func float: log (in float: x)
-
Return the natural logarithm (base e) of x.
log(NaN) returns NaN log(1.0) returns 0.0 log(Infinity) returns Infinity log(0.0) returns -Infinity log(x) returns NaN for x < 0.0
- Returns:
- the natural logarithm of x.
log1p
const func float: log1p (in float: x)
-
Compute log(1.0 + x) (natural logarithm of the sum of 1 and x). The result is computed in a way that is accurate even if the value of x is near zero.
log1p(NaN) returns NaN log1p(0.0) returns 0.0 log1p(Infinity) returns Infinity log1p(-1.0) returns -Infinity log1p(x) returns NaN for x < -1.0
- Returns:
- log(1.0 + x)
log10
const func float: log10 (in float: x)
-
Returns the base 10 logarithm of x.
log10(NaN) returns NaN log10(1.0) returns 0.0 log10(Infinity) returns Infinity log10(0.0) returns -Infinity log10(X) returns NaN for X < 0.0
- Returns:
- the base 10 logarithm of x.
log2
const func float: log2 (in float: x)
-
Returns the base 2 logarithm of x.
log2(NaN) returns NaN log2(1.0) returns 0.0 log2(Infinity) returns Infinity log2(0.0) returns -Infinity log2(X) returns NaN for X < 0.0
- Returns:
- the base 2 logarithm of x.
sqrt
const func float: sqrt (in float: x)
-
Returns the non-negative square root of x.
sqrt(NaN) returns NaN sqrt(0.0) returns 0.0 sqrt(Infinity) returns Infinity sqrt(X) returns NaN for X < 0.0
- Returns:
- the square root of x.
ceil
const func float: ceil (in float: x)
-
Round up towards positive infinity. Determine the smallest value that is greater than or equal to the argument and is equal to a mathematical integer.
- Returns:
- the rounded value.
floor
const func float: floor (in float: x)
-
Round down towards negative infinity. Returns the largest value that is less than or equal to the argument and is equal to a mathematical integer.
- Returns:
- the rounded value.
|
|