Math.atan( ) Method

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
Math.atan( ) Method Flash 5; may be used when exporting Flash 4 movies

compute the arc tangent of a number
Math.atan(x)

Arguments

x

A number between -Infinity and Infinity, inclusive (the tangent of some angle).

Returns

The angle, in radians, whose tangent is x.

Description

The arc tangent function (sometimes written as tan-1) is the inverse of the tangent function. It returns the angle whose tangent has the specified value, in radians. The return value is in the range of -figs/u03c0.gif/2 to figs/u03c0.gif/2.

Example

trace (Math.atan(1.0));       // Displays: 0.78539... trace (Math.atan(0.0));       // Displays: 0 trace (Math.atan(-Infinity)); // Displays: -1.5707... (i.e., -pi/2)

See Also

Math.acos( ), Math.asin( ), Math.tan( )



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net