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, then return NaN.
JavaScript version: ECMAScript 1

Browser understøttelse

Math.atan() Er ES1-karaktæristik (JavaScript 1999). Alle browsere understøtter det fuldt ud:

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

Relaterede sider

Vejledning:JavaScript matematik