JavaScript atan()Method
Example
Return the arctangent of the specified number:
Math.atan(2);
Output result:
1.1071487177940904
Try it »
Definition and Usage
The atan() method returns the arctangent of x as a numeric value between -PI/2 and PI/2 radians.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the atan() method
Syntax
Math.atan(x)
Parameter Values
| Parameter | Description |
|---|---|
| x | Required. Must be a number. |
Return Value
| Type | Description |
|---|---|
| Number | The arctangent of x. The returned value is in radians between -PI/2 and PI/2. |
Technical Details
| JavaScript Version: | 1.0 |
|---|
Other Extensions
JavaScript Math Object