JavaScript Scratches
Math Constants (Properties)
There are 8 constant mathematical values available in JavaScript
- Math.E
returns Euler's number
- Math.PI
returns pi (π)
- Math.SQRT2
returns sqaure root of 2
- Math.SQRT1_2
returns square root of ½
- Math.LN2
returns the natural logarithm of 2
- Math.LN10
returns the natural logarithm of 10
- Math.LOG2E
returns base 2 logarithm of E
- Math.LOG10E
returns base 10 logarithm of E