Skip to main content
Version: 3.13.0

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 -π2-\frac{\pi}{2} and π2\frac{\pi}{2}, inclusive) of x. If x is Infinity, it returns π2\frac{\pi}{2}. If x is -Infinity, it returns -π2-\frac{\pi}{2}.

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).