Math Object
The Math object includes several mathematical constants and methods.
The mathematical constants that can be accessed from the Math object, there are also several methods available.
Mathematical Constants
JavaScript provides eight mathematical constants. These constants can be accessed from the Math object. These are: E, PI, square root of 2, square root of 1/2, natural log of 2, natural log of 10, base-2 log of E, and base-10 log of E.
Object: Math
Properties: E, PI, sqrt, SQRT2, SQRT1_2, LN2, LN10, LOG2E, LOG10E
Syntax: Math.E
Syntax: Math.PI
Syntax: Math.SQRT2
Syntax: Math.SQRT1_2
Syntax: Math.LN2
Syntax: Math.LN10
Syntax: Math.LOG2E
Syntax: Math.LOG10E
No comments:
Post a Comment