Atan2
  • 27 May 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

Atan2

  • Dark
    Light
  • PDF

Article Summary

Calculates the angle between the vertical x-axis, and a line drawn between the given x/y coordinates and the origin. The value is returned in radians.

Function signature

ATAN2(numberx: Number, numbery: Number) => Number
ParameterDescription
Number XThe x coordinate of the endpoint of the line segment for which to calculate the angle from the x-axis
Number YThe y coordinate of the endpoint of the line segment for which to calculate the angle from the x-axis.

Examples

FormulaReturn value
ATAN2(0.9, 0.7)0.66104317
ATAN2(1, -9)-1.46013911
ATAN2(0.5, 0)0

Was this article helpful?

What's Next