Polar Angles |
angle(x, y) Returns the angle from the x-axis to a line containing the origin and the point (x,y). Results are in radians between 0 and 2π, excluding 2π.
atan2(x, y) Returns the angle from the x-axis to a line containing the origin and the point (x,y). Results are in radians between –π and π, excluding –π.
The atan2 function is related to the functions atan and arg by the following relationships:
atan2(x,y) = atan(y/x) (although atan returns values between –π/2 and π/2)– and –
atan2(x,y) = arg(x + yi)