atan Function

Top  Previous  Next

Returns the arctangent of a number as a value between -PI/2 and PI/2 radians.

Syntax

Math.atan(number)

Arguments

numberA number.        

Return Value

A number, from -PI/2 to PI/.  If the argument is a string, the function returns NaN.

Examples

Math.atan(1);      // Returns 0.7853982

Math.atan(0);      // Returns 0

Math.atan(1000);      // Returns 1.569796

Math.atan(-10000);    // Returns -1.570696

See also

Math.atan2