JavaScript Math.atan()
Definition and Usage
The Math.atan() method returns the arctangent of a number as a value between -PI/2 and PI/2 radians.
Browser Support
Math.atan()
is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |
Syntax
Math.atan(x)
Parametes
Parameter | Description |
---|---|
x | Required. A number |
Return Value
A number from -PI/2 to PI/2. NaN if the value is empty. |