Formulas and Functions
ATAN2
The ATAN2 function returns the angle, relative to the positive x-axis, of the line passing through the origin and the specified point. Both arguments are number values.
ATAN2(x-point, y-point)
x-point: The x-coordinate of the point the line passes through.
y-point: The y-coordinate of the point the line passes through.
Notes
The angle is expressed in radians, in the range –π to π (–pi through pi). To see the resulting angle in degrees instead of radians, wrap this function in the DEGREES function; that is, =DEGREES(ATAN2(x-point, y-point)).
Examples |
---|
=ATAN2(1,1) returns 0.785398163397448 radians (45 degrees), the angle of a line segment from the origin to point (1, 1). =DEGREES(ATAN2(5, 5)) returns 45. |