atan2

Returns the radian value of the arc tangent of specified X and Y coordinates. The arc tangent is the angle from the X-axis to a line passing through the origin and a point with coordinates X,Y. The returned angle is in radians, from -pi to pi, excluding -pi.

float atan2(float Y, float X )

X is the X coordinate of the point.

Y is the Y coordinate of the point.

Example

atan2(1,1)

Returns 0.785 radians.