JavaScript Math : Object
Contains math related constants and functions.
Math Properties
The constant e = 2.718...
The value of the natural log of 10.
The value of the natural log of 2.
The value of the log base 10 of e.
The value of the log base 2 of e.
The constant pi = 3.14...
The value of 1 / sqrt(2).
Math Methods
Returns the absolute value of x.
Returns the angle (in radians between 0 and pi) whose cosine is x.
Returns the angle (in radians between -pi/2 and pi/2) whose sine is x.
Returns the angle (in radians between -pi/2 and pi/2) whose tangent is x.
Returns the angle (in radians between -pi and pi) between the positive x axis and the line segment from the origin to the point at (x, y).
Returns the next integer greater than or equal to x.
Returns the cosine of x (in radians).
Returns e raised to the x power.
Returns the previous integer less than or equal to x.
Returns the natural logarithm (base e) of x. To compute the logarithm with respect to a different base b, use the formula Math.log(x) / Math.log(b).
Returns the largest number among the parameters.
Returns the smallest number among the parameters.
Returns x raised to the y power.
Returns a random number between 0 (inclusive) and 1 (exclusive).
Returns the closest integer to x.
Returns the sine of x (in radians).
Returns the square root of x.
Returns the tangent of x (in radians).
Copyright © JavaScripture.com