Javascript Math functions reference.

Javascript build-in Math object reference.

The Math object:

Constructor (Math) Methods:

Syntax: Math.abs(x)
The returning result has the same magnitude as x but has positive sign.
Return value: A number that is the absolute value of x.
An example of using the Math.abs() :

Constructor (Math) Constants:

Math.E: The number value for e, the base of the natural logarithms, which is approximately 2.7182818284590452354.
Math.LN: The number value for the natural logarithm of 10, which is approximately 2.302585092994046.
Math.LN2: The number value for the natural logarithm of 2, which is approximately 0.6931471805599453.
Math.LOG2E: The number value for the base-2 logarithm of e, the base of the natural logarithms; this value is approximately 1.4426950408889634.
Math.LOG10E: The number value for the base-10 logarithm of e, the base of the natural logarithms; this value is approximately 0.4342944819032518.
Math.PI: The number value for Π (pi), the ratio of the circumference of a circle to its diameter, which is approximately 3.1415926535897932.
Math.SQRT1_2: The number value for the square root of 1/2, which is approximately 0.7071067811865476.
Math.SQRT2: The number value for the square root of 2, which is approximately 1.4142135623730951.

© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.