Math.atan()
Math.atan(x) → number
Returns the arctangent of x.
Returns the angle, in radians, whose tangent is x. The result is in the range -π/2 to π/2.
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| x | number | optional | — | A number. |
Returns
number
The arctangent of x, in radians.
Example
let a = Math.atan(1); // 0.7853981633974483