Monday, February 9, 2015

JavaScript provides 8 mathematical constants that can be accessed with the Math object

Math.E;         // returns Euler's numberMath.PI         // returns PIMath.SQRT2      // returns the square root of 2Math.SQRT1_2    // returns the square root of 1/2Math.LN2        // returns the natural logarithm of 2Math.LN10       // returns the natural logarithm of 10Math.LOG2E      // returns base 2 logarithm of EMath.LOG10E     // returns base 10 logarithm of E

No comments:

Post a Comment