Method | NS2 | NS3 | NS4 | NS6 | IE3a | IE3b | IE4 | IE5 | IE5.5 | IE6 |
Eabs | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the absolute value of a number. |
| Syntax: Math.abs( value ) , where value is the number for which you want the absolute value. |
acos | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the arc cosine of a value, in radians. |
| Syntax: Math.acos( value ) , where value is the value for which you want the arc cosine. |
asin | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the arc sine of a value, in radians. |
| Syntax: Math.asin( value ) , where value is the value for which you want the arc sine. |
atan | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the arc tangent of a value, in radians. |
| Syntax: Math.atan( value ) , where value is the value for which you want the arc tangent. |
atan2 | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the angle (in radians) from the X axis to a point ( y , x ). |
| Syntax: Math.atan2( y , x ) . |
ceil | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the smallest integer greater than or equal to the value you pass. |
| Syntax: Math.ceil( value ) , where value is the value you want to round up. |
cos | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the cosine of a value. |
| Syntax: Math.cos( value ) , where value is the value, in radians, for which you want the cosine. |
exp | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns e to the power you specify. |
| Syntax: Math.exp( value ) , where value is the value for which you want e to the power. |
floor | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the greatest integer less than or equal to the value you pass. |
| Syntax: Math.floor( value ) , where value is the value you want to round down. |
log | x | x | x | x | x | x | x | x | x | x |
| Returns: number |
| Returns the natural log, base e, of a value. |
| Syntax: Math.log( value ) , where value is the value for which you want the natural log. |
max | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the greater of the two values you pass to it. |
| Syntax: Math.max( value1 , value2 ) , where value1 and value2 are the values you're comparing. |
min | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the lesser of the two values you pass to it. |
| Syntax: Math.min( value1 , value2 ) , where value1 and value2 are the values you're comparing. |
pow | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the value of a base expression raised to a given power. |
| Syntax: Math.pow( base , exponent ) . |
random | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns a random number between 0 and 1. |
| Syntax: Math.random() . |
round | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns an numeric expression rounded to the nearest integer. |
| Math.round( value ) . If the decimal part of value is 0.5 or greater, the return value is the smallest integer that is still greater than value . Otherwise, the return value is the largest integer less than or equal to value . |
sin | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the sine of a value. |
| Syntax: Math.sin( value ) , where value is the value, in radians, for which you want the sine. |
sqrt | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the square root of a value. |
| Syntax: Math.sqrt( value ) , where value is the value, in radians, for which you want the square root. |
tan | x | x | x | x | x | x | x | x | x | x |
| Returns: Number |
| Returns the tangent of a value. |
| Syntax: Math.tan( value ) , where value is the value, in radians, for which you want the tangent. |