JavaScript atan() method

Definition and usage

atan() The method returns the arctangent value of the number, the returned value is the radian value between -PI/2 and PI/2.

Example

Returns the arctangent of the specified number:

Math.atan(2);

Try it yourself

Syntax

Math.atan(x)

Parameter value

Parameter Description
x Required. Number.

Technical details

Return value: Numbers, from -PI/2 to PI/2, if the value is empty, it returns NaN.
JavaScript version: ECMAScript 1

Browser Support

Math.atan() Is an ES1 feature (JavaScript 1999). All browsers fully support it:

Chrome IE Edge Firefox Safari Opera
Support Support Support Support Support Support

Related Pages

Tutorial:JavaScript Mathematics