ATAN2 (NumberX, NumberY) ATAN2 (NumberX; NumberY)
NumberX
Number Number
The X coordinate of the point. Both coordinates must not be zero at the same time.
NumberY
Number Number
The Y coordinate of the point.
Returns
Number Number
The angle in radians between the positive x-axis and the line to the point.
Returns the angle, in radians, between the positive x-axis and the line from the origin to the point (NumberX, NumberY). Unlike ATAN, which only accepts a single ratio, this function uses separate X and Y coordinates and returns a result in the full range of -pi to pi, correctly handling all four quadrants. Use DEGREES to convert the result to degrees.