atan2
expression function
Returns the arc-tangent of y/x.
Usage
atan2(y, x)
This is more stable than atan since it can use the signs of y and x to determine the quadrant the angle is in. It also handles the case where x is zero correctly, returning 90 or -90.
Examples
atan2(1, 0) = 90
atan2(0, 1) = 0
atan2(0, -1) = 180