Math()

JavaScript 1.0+, ECMAScript 1.0+, JScript 1.0+ Nav2+, NES2+, IE 3+, Opera3+ Syntax

Core JavaScript Object

Description

The Math object is a built-in object containing properties and methods used for mathematical computation. It is a predefined JavaScript object and can be accessed without the use of a constructor or calling method. All Math properties and methods are static. Table 6.28 shows the different methods and properties of the Math object.

Table 6.28. Properties and Methods of the Math Object
Property/Method Description
abs() Returns absolute value of a number
acos() Returns the arccosine of a number
asin() Returns the arcsine of a number
atan() Returns the arctangent of a number
atan2() Returns the arctangent of the quotient ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.