Math static properties and methods in java script
Static properties
- Math.E
Return eular constant (2.178) - Math.LN2
Natural logarithm of 2 (0.693) - Math.LN10
Natural logarithm of 2 (2.303) - Math.PI
Return Math pi value(3.14159)
Static methods
- Math.abs()
Return absolute value - Math.sin()
Return sin value - Math.cos()
Return cosine value - Math.tan()
Return tangent value - Math.cbrt()
Return cube root - Math.ceil()
Round up to nearest integer - Math.floor()
Round down to nearest integer - Math.round()
Round the number as math - Math.exp() (2.718)
Return exponential value - Math.hypot()
Return the square root of the sum of squares of its arguments - Math.log()
Return natural log - Math.log10()
Return log of base 10 - Math.max()
Return maximum value from the given arguments - Math.min()
Return minimum value from the given arguments - Math.pow()
Return the value of base raised to the power - Math.sqrt()
Return the square root of value - Math.sign()
Return the sign(-1 for negative value, 1 for positive value, 0 for zero value) - Math.trunc()
Return the integer number by removing fractional part