Javascript Reference
Categories: Math

javascript Math Description

@March 15, 2008, 1:22 a.m.
MathFirefox/Netscape/NN 2 IE 3 ECMA 1  

  

The Math object is used only in its static object form as a library of math constant values and (mostly trigonometric) operations. As a result, there is no constructor function. Math object properties are constant values, while methods return a numeric value reflecting some math operation on a value; the original value is not altered when the method is invoked.

 

Invoking a Math object property or method adheres to the following syntax:

Math.propertyName
Math.method(param1[, param2])
 

Be sure to observe the uppercase "M" in the Math object in script statements. All expressions involving the Math object evaluate to or return a value.

 
Properties
 
ELN10LN2LOG10ELOG2EPISQRT1_2SQRT2
 
Methods
 
abs( )acos( )asin( )atan( )atan2( )ceil( )
cos( )exp( )floor( )log( )max( )min( )
pow( )random( )round( )sin( )sqrt( )tan( )

Powered by Linode.