Property Summary | |
---|---|
Number | E Euler's constant and the base of natural logarithms. |
Number | LN10 Natural logarithm of 10. |
Number | LN2 Natural logarithm of 2. |
Number | LOG10E Base 10 logarithm of E. |
Number | LOG2E Base 2 logarithm of E. |
Number | PI Ratio of the circumference of a circle to its diameter. |
Number | SQRT1_2 Square root of 1/2. |
Number | SQRT2 Square root of 2. |
Method Summary | |
---|---|
Number | abs(x) Returns the absolute value of a number. |
Number | acos(x) Returns the arccosine (in radians) of a number. |
Number | asin(x) Returns the arcsine (in radians) of a number. |
Number | atan(x) Returns the arctangent (in radians) of a number. |
Number | atan2(y, x) Returns the arctangent of the quotient of its arguments. |
Number | ceil(x) Returns the smallest integer greater than or equal to a number. |
Number | cos(x) Returns the cosine of a number. |
Number | exp(x) Returns Enumber, where number is the argument, and E is Euler's constant, the base of the natural logarithms. |
Number | floor(x) Returns the largest integer less than or equal to a number. |
Number | log(x) Returns the natural logarithm (base E) of a number. |
Number | max(value) Returns the greater of two (or more) numbers. |
Number | min(value) Returns the lesser of two (or more) numbers. |
Number | pow(base, exponent) Returns base to the exponent power, that is, base exponent. |
void | random() Returns a pseudo-random number between 0 and 1. |
void | round(x) Returns the value of a number rounded to the nearest integer. |
void | sin(x) Returns the sine of a number. |
void | sqrt(x) Returns the square root of a number. |
void | tan(x) Returns the tangent of a number. |
Property Details |
---|
E |
Euler's constant and the base of natural logarithms. Approximately 2.718.
|
Returns |
SampleMath.E |
LN10 |
Natural logarithm of 10. Approximately 2.302.
|
Returns |
SampleMath.LN10 |
LN2 |
Natural logarithm of 2. Approximately 0.693.
|
Returns |
SampleMath.LN2 |
LOG10E |
Base 10 logarithm of E. Approximately 0.434.
|
Returns |
SampleMath.LOG10E |
LOG2E |
Base 2 logarithm of E. Approximately 1.442.
|
Returns |
SampleMath.LOG2E |
PI |
Ratio of the circumference of a circle to its diameter. Approximately 3.14159.
|
Returns |
SampleMath.PI |
SQRT1_2 |
Square root of 1/2. Equivalently, 1 over the square root of 2, approximately 0.707.
|
Returns |
SampleMath.SQRT1_2 |
SQRT2 |
Square root of 2. Approximately 1.414.
|
Returns |
SampleMath.SQRT2 |
Method Details |
---|
abs |
Number abs (x) |
Returns the absolute value of a number.
|
Parameters {Number} x
|
Returns |
SampleMath.abs(number) |
acos |
Number acos (x) |
Returns the arccosine (in radians) of a number.
|
Parameters {Number} x
|
Returns |
SampleMath.acos(number) |
asin |
Number asin (x) |
Returns the arcsine (in radians) of a number.
|
Parameters {Number} x
|
Returns |
SampleMath.asin(number) |
atan |
Number atan (x) |
Returns the arctangent (in radians) of a number.
|
Parameters {Number} x
|
Returns |
SampleMath.atan(number) |
atan2 |
Number atan2 (y, x) |
Returns the arctangent of the quotient of its arguments.
|
Parameters |
Returns |
SampleMath.atan2(number,number) |
ceil |
Number ceil (x) |
Returns the smallest integer greater than or equal to a number.
|
Parameters {Number} x
|
Returns |
SampleMath.ceil(number) |
cos |
Number cos (x) |
Returns the cosine of a number.
|
Parameters {Number} x
|
Returns |
SampleMath.cos(number) |
exp |
Number exp (x) |
Returns Enumber, where number is the argument, and E is Euler's constant, the base of the natural logarithms.
|
Parameters {Number} x
|
Returns |
SampleMath.exp(number) |
floor |
Number floor (x) |
Returns the largest integer less than or equal to a number.
|
Parameters {Number} x
|
Returns |
SampleMath.floor(number) |
log |
Number log (x) |
Returns the natural logarithm (base E) of a number.
|
Parameters {Number} x
|
Returns |
SampleMath.log(number) |
max |
Number max (value) |
Returns the greater of two (or more) numbers.
|
Parameters {Number...} value
|
Returns |
SampleMath.max(number,number,number) |
min |
Number min (value) |
Returns the lesser of two (or more) numbers.
|
Parameters {Number...} value
|
Returns |
SampleMath.min(number,number,number) |
pow |
Number pow (base, exponent) |
Returns base to the exponent power, that is, base exponent.
|
Parameters |
Returns |
SampleMath.pow(number,number) |
random |
void random () |
Returns a pseudo-random number between 0 and 1.
|
Returns void
|
SampleMath.random() |
round |
void round (x) |
Returns the value of a number rounded to the nearest integer.
|
Parameters {Number} x
|
Returns void
|
SampleMath.round(number) |
sin |
void sin (x) |
Returns the sine of a number.
|
Parameters {Number} x
|
Returns void
|
SampleMath.sin(number) |
sqrt |
void sqrt (x) |
Returns the square root of a number.
|
Parameters {Number} x
|
Returns void
|
SampleMath.sqrt(number) |
tan |
void tan (x) |
Returns the tangent of a number.
|
Parameters {Number} x
|
Returns void
|
SampleMath.tan(number) |