atan2
atan2(y, x)
Computes the principal value of the arc tangent of y/x in radians.
Try it yourself:
$1 | atan2(2, 2) / pi
| |
$2 | angle = 60 deg in rad
| |
$3 | x = cos(angle)
| |
$4 | y = sin(angle)
| |
$5 | atan2(y, x)
|