Math.atan()
The Math.atan()
function returns the inverse tangent (in radians) of a number.
Syntax
Math.atan(x)
Parameters
x
- : A number.
Return value
The inverse tangent (angle in radians between and , inclusive) of x
. If x
is Infinity
, it returns . If x
is -Infinity
, it returns .
Description
Because atan()
is a static method of Math
, you always use it as Math.atan()
, rather than as a method of a Math
object you created (Math
is not a constructor).