Math

Math.Math.`constant`

( )`function`

The Math object is a placeholder for grouping mathematical
constants and functions. It does not define a class of objects as Date
and String do. There is no `Math( )`

constructor, and functions like ```
Math.sin(
)
```

are simply functions, not methods that operate on an
object.

`Math.E`

The constant

*e*, the base of the natural logarithm.`Math.LN10`

The natural logarithm of 10.

`Math.LN2`

The natural logarithm of 2.

`Math.LOG10E`

The base-10 logarithm of

*e*.`Math.LOG2E`

The base-2 logarithm of

*e*.`Math.PI`

The constant π.

`Math.SQRT1_2`

1 divided by the square root of 2.

`Math.SQRT2`

The square root of 2.

`Math.abs(`

`x`

`)`

Returns the absolute value of

.`x`

`Math.acos(`

`x`

`)`

Returns the arc cosine of

; the return value is between 0 and π radians.`x`

`Math.asin(`

`x`

`)`

Returns the arc sine of

; the return value is between -π/2 and π/2 radians.`x`

`Math.atan(`

`x`

`)`

Returns the arc tangent of

; the return value is between -π/2 and π/2 radians.`x`

`Math.atan2(`

,`y`

`x`

`)`

Returns a value between -π and π radians that specifies the counterclockwise angle between the positive X-axis and the point (

,`x`

). Note the order of the arguments to this function.`y`

`Math.ceil(`

`x`

`)`

Returns the nearest integer greater than or equal to

.`x`

`Math.cos(`

`x`

`)`

Returns the cosine of the specified value

.`x`

`Math.exp(`

`x`

`)`

Returns the constant

*e*raised to the power of.`x`

`Math.floor(`

`x`

`)`

Returns the nearest integer less than or equal to

.`x`

`Math.log(`

`x`

`)`

Returns the natural logarithm of

.`x`

`Math.max(`

`args...`

`)`

Returns the largest of the arguments. Returns ...

Start Free Trial

No credit card required