Overview
Grammar | ATAN2(x_num, y_num) | Returns the arctangent of X and Y coordinates. The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and the point (x_num, y_num). |
Parameter 1 | x_num | The x-coordinate of the point. |
Parameter 2 | y_num | The y-coordinate of the point. |
Notes
The function supports two numerical parameters.
A positive result represents a counterclockwise angle from the x-axis; a negative result represents a clockwise angle. ATAN2(a,b)=ATAN(b/a), except when a equals 0. If both x_num and y_num are 0, ATAN2 returns the *DIV/0! error value. To express the returned angle in degrees, multiply the result by 180/PI(). The returned value is expressed in radians between -pi and pi, excluding -pi.
Example
Formula | Result | Notes |
---|---|---|
ATAN2(-2,2) | 2.356194490192345 | 3*pi/4 radians |
ATAN2(2,2) | 0.785398163 | pi/4 radian |
ATAN2(-2,2)*180/PI() | 135 | 135 degrees |