Math API
JavaScript mathematical operations and constants.
Math is a built-in object that provides mathematical constants and functions for operations such as trigonometry, logarithms, exponents, and other calculations.
Unlike most JavaScript objects, Math is not a constructor. All properties and methods of Math are static. You use mathematical constants like Math.PI and Math.E as fixed values, and mathematical functions like Math.sin(), Math.cos(), Math.tan(), Math.log(), and Math.exp() for trigonometric and exponential operations. Utility functions such as Math.min(), Math.max(), Math.abs(), Math.floor(), Math.ceil(), and Math.round() handle common numeric operations.