Math.atan( ) In JavaScript

The Math.atan( ) function in JavaScript is used to return the arctangent of a number in radians.

Math.atan(x)=arctan(x)=unique y,where y belongs to [-pi/2;pi/2] 
such that tan(y)=x

The Math.atan() method returns a numeric value between -pi/2 and pi/2 radians.
atan() is a static method of Math, therefore, it is always used as Math.atan(), rather than as a method of a Math object created.

Syntax:

Math.atan(value)

Parameters: This function accepts a single parameter which is a number in radians who arctangent you want to find.

Returns: The Math.atan() function returns the arctangent of the given number in radians.

Examples:

Input  : Math.atan(1)
Output : 0.7853981633974483
     
Input  : Math.atan(0)
Output : 0

Input  : Math.atan(-0)
Output : -0

Input  : Math.atan(Infinity)
Output : 1.5707963267948966

Input  : Math.atan(-Infinity)
Output : -1.5707963267948966