Math.atan2()
Availability
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.
Usage
Math.atan2(y:Number, x:Number) : Number
Parameters
A number specifying the y coordinate of the point.
y
A number specifying the x coordinate of the point.
x
Returns
A number.
Description
Method; computes and returns the angle of the point
counterclockwise from a circle's x axis (where 0,0 represents the center of the circle). The return
value is between positive pi and negative pi.
Example
The following example displays the following radians from the specified coordinates 10, 0.
trace(Math.atan2(10, 0)); // output: 1.5707963267949
See also
Math.acos(), Math.asin(), Math.atan(), Math.cos(), Math.sin(),
/
in radians, when measured
y
x
Math.tan()
Math.atan2()
425
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?