ECMAScript | |
---|---|
Number | abs ( Number num ) |
Number | acos ( Number num ) |
Number | asin ( Number num ) |
Number | atan ( Number num ) |
Number | atan2 ( Number yCoord, Number xCoord ) |
Number | ceil ( Number num ) |
Number | cos ( Number num ) |
Number | exp ( Number num ) |
Number | floor ( Number num ) |
Number | log ( Number num ) |
Number | max ( Number num1, Number num2 ) |
Number | min ( Number num1, Number num2 ) |
Number | pow ( Number num, Number power ) |
Number | random () |
Number | round ( Number num ) |
Number | sin ( Number num ) |
Number | sqrt ( Number num ) |
Number | tan ( Number num ) |
This object implements ECMAScript math functions. One instance of the object is automatically created in the global namespace when the script engine is initialized. That instance is accessible via Global::Math. Additional instances of the object cannot be created. See the ECMA script specification for more information.
Todo
Examples:
Euler's constant. The base for natural logarithms. (Read Only)
Natural logarithm of 10. (Read Only)
Natural logarithm of 2. (Read Only)
Base 10 logarithm of E. (Read Only)
Base 2 logarithm of E. (Read Only)
Pi (3.141592653589793). (Read Only)
Square root of 1/2. (Read Only)
Square root of 2. (Read Only)
Parameter(s):
Return Value:
num
.
If num
is out of range, returns NaN.
Parameter(s):
Return Value:
num
in radians between 0 and PI.
If num
is out of range, returns NaN.
Parameter(s):
Return Value:
num
in radians between -PI/2 and PI/2.
If num
is out of range, returns NaN.
Parameter(s):
Return Value:
num
in radians between -PI/2 and PI/2.Number : atan2( Number yCoord, Number xCoord )
Parameter(s):
Return Value:
xCoord
, yCoord
). The value returned is always between -PI and PI.Parameter(s):
Return Value:
num
is an integer, returns num
. If num
is a float, returns the smallest integer greater than num
.Parameter(s):
Return Value:
num
. The value will be in the range [-1,1].Parameter(s):
Return Value:
num
.Parameter(s):
Return Value:
num
is an integer, returns num
. If num
is a float, returns the greatest integer less than num
.Parameter(s):
Return Value:
num
is > 0, returns the natural logarithm of num
. If num
is 0, returns Infinity. If num
is < 0, returns NaN.Number : max( Number num1, Number num2 )
Parameter(s):
Return Value:
num1
and num2
.Number : min( Number num1, Number num2 )
Parameter(s):
Return Value:
num1
and num2
.Number : pow( Number num, Number power )
Parameter(s):
Return Value:
num
raised to power.Return Value:
Parameter(s):
Return Value:
num
rounded to the nearest integer. If the fractional part of num
is >= 0.5, num
is rounded up; otherwise it is rounded down.Parameter(s):
Return Value:
num
. The value will be in the range [-1,1].Parameter(s):
Return Value:
num
is >= 0, returns the square root. If num
is < 0, returns NaN.Parameter(s):
Return Value:
num
.