The Math object in JavaScript. All Math properties and methods are static that are accessed directly from the prototype as opposed to an instance.

## Properties

All the Math properties are in ALL CAPs because they are all constants.

`.E`

. Euler's constant and the base of natural logarithms, approximately 2.718.

`.LN10`

. Natural logarithm of 10, approximately 2.302.

`.LN2`

. Natural logarithm of 2, approximately 0.693.

`.LOG10E`

. Base 10 logarithm of E (approximately 0.434).

`.LOG2E`

. Base 2 logarithm of E (approximately 1.442).

`.PI`

. Ratio of the circumference of a circle to its diameter, approximately 3.14159.

`.SQRT1_2`

. Square root of 1/2; equivalently, 1 over the square root of 2, approximately 0.707.

`.SQRT2`

. Square root of 2, approximately 1.414.

## Methods

`.abs(`

. Returns the absolute value of a number.*n*)

`.acos(`

. Returns the arccosine (in radians) of a number. The acos method returns a numeric value between 0 and pi radians. If the value of number is outside this range, it returns *n*)`NaN`

.

`.asin(`

. Returns the arcsine (in radians) of a number. The asin method returns a numeric value between -pi/2 and pi/2 radians. If the value of number is outside this range, it returns *n*)`NaN`

.

`.atan(`

. Returns the arctangent (in radians) of a number. The atan method returns a numeric value between -pi/2 and pi/2 radians.*n*)

`.atan2(`

. Returns the arctangent of the quotient of its arguments. The atan2 method returns a numeric value between -pi and pi representing the angle theta of an (x,y) point.*y*,*x*)

`.ceil(`

. Returns the smallest integer greater than or equal to a number. *n*)

`.cos(`

. Returns the cosine of a number. The cos method returns a numeric value between -1 and 1.*n*)

`.exp(`

. Returns *n*)`E`

* ^{n}*, where

*is the argument, and*

`n`

`E`

is Euler's constant, the base of the natural logarithms. `.floor(`

. Returns the largest integer less than or equal to a number.*n*)

`.log(`

. Returns the natural logarithm (base E) of a number. *n*)

`.max(`

. Returns the greater of two numbers.*m*,*n*)

`.min(`

. Returns the lesser of two numbers. *m*,*n*)

`.pow(`

. Returns *base*,*exponent*)* base* to the

*power, that is,*

`exponent`

*.*

`base`^{exponent}

`.random()`

. Returns a pseudo-random number between 0 and 1. (Seeded from the current time)

`.round(`

. Returns the value of a number rounded to the nearest integer.*n*)

`.sin(`

. Returns the sine of a number. 1, which represents the sine of the argument. *n*)

`.sqrt(`

. Returns the square root of a number.*n*)

`.tan(`

. Returns the tangent of a number. *n*)