Core Object | NN | IE | ECMA |
Math | Object with math functionality and constants. | 2+ | 3+ | ECMA 1 |
|
Methods | NN | IE | ECMA |
abs() | Returns the absolute value of a number. | 2+ | 3+ | ECMA 1 |
acos() | Returns the arccosine (in radians) of a number. | 2+ | 3+ | ECMA 1 |
asin() | Returns the arcsine (in radians) of a number. | 2+ | 3+ | ECMA 1 |
atan() | Returns the arctangent (in radians) of a number. | 2+ | 3+ | ECMA 1 |
atan2() | Returns the arctangent of the quotient of its arguments. | 2+ | 3+ | ECMA 1 |
ceil() | Returns the smallest integer greater than or equal to a number. | 2+ | 3+ | ECMA 1 |
cos() | Returns the cosine of a number. | 2+ | 3+ | ECMA 1 |
exp() | Returns e (the base of natural logarithms) raised to a power. | 2+ | 3+ | ECMA 1 |
floor() | Returns the largest integer less than or equal to a number. | 2+ | 3+ | ECMA 1 |
log() | Returns the natural logarithm (base E) of a number. | 2+ | 3+ | ECMA 1 |
max() | Returns the greater of two numbers. | 2+ | 3+ | ECMA 1 |
min() | Returns the lesser of two numbers. | 2+ | 3+ | ECMA 1 |
pow() | Returns the value of a base expression taken to a specified power. | 2+ | 3+ | ECMA 1 |
random() | Returns a pseudo random number between 0 and 1. | 2+ | 3+ | ECMA 1 |
round() | Returns the value of a number rounded to the nearest integer. | 2+ | 3+ | ECMA 1 |
sin() | Returns the sine of a number. | 2+ | 3+ | ECMA 1 |
sqrt() | Returns the square root of a number. | 2+ | 3+ | ECMA 1 |
tan() | Returns the tangent of a number. | 2+ | 3+ | ECMA 1 |
|
Properties | NN | IE | ECMA |
E | Euler's constant, approximately 2.718. | 2+ | 3+ | ECMA 1 |
LN2 | Natural logarithm of 2, approximately 0.693. | 2+ | 3+ | ECMA 1 |
LN10 | Natural logarithm of 10, approximately 2.302. | 2+ | 3+ | ECMA 1 |
LOG2E | Base 2 logarithm of E, approximately 1.442. | 2+ | 3+ | ECMA 1 |
LOG10E | Base 10 logarithm of E, approximately 0.434. | 2+ | 3+ | ECMA 1 |
PI | The value of PI, approximately 3.14159. | 2+ | 3+ | ECMA 1 |
SQRT1_2 | Square root of 1/2, approximately 0.707. | 2+ | 3+ | ECMA 1 |
SQRT2 | Square root of 2, approximately 1.414. | 2+ | 3+ | ECMA 1 |