Math.atan2

기준점에서 특정한 좌표와의 각도를 구합니다. 반환값은 라디안값입니다. 라디안값을 일반적인 호도법 수치 degree(360도)로 변환하기 위해서는 returnNumber*180/Math.PI의 과정을 거쳐야 합니다.

Math.atan2()
Availability
Flash Player 5. In Flash Player 4, the methods and properties of the Math class are emulated using approximations and may not be as accurate as the non-emulated math functions supported by Flash Player 5.

Usage
Math.atan2(y, x)

Parameters
y; A number specifying the y coordinate of the point.
x; A number specifying the x coordinate of the point.

Returns
A number.

Description
Method; computes and returns the angle of the point y/x in radians, when measured 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.

See also
Math.atan(), Math.tan()