atan (Math.atan method)

public static atan(tangent:Number) : Number

Computes and returns the value, in radians, of the angle whose tangent is specified in the parameter tangent. The return value is between negative pi divided by 2 and positive pi divided by 2.

Availability: ActionScript 1.0; Flash Player 5 - In Flash Player 4, the methods and properties of the Math class are emulated using approximations and might not be as accurate as the non-emulated math functions that Flash Player 5 supports.

Parameters

tangent:Number - A number that represents the tangent of an angle.

Returns

Number - A number between negative pi divided by 2 and positive pi divided by 2.

Example

The following example displays the angle value for several tangents.

trace(Math.atan(-1)); // output: -0.785398163397448
trace(Math.atan(0)); // output: 0
trace(Math.atan(1)); // output: 0.785398163397448

See also

acos (Math.acos method), asin (Math.asin method), atan2 (Math.atan2 method), cos (Math.cos method), sin (Math.sin method), tan (Math.tan method)


Flash CS3