arc tan2 function

The atan2 function is an inverse trigonometric function. The atan2 function is a two-argument arc tangent (inverse of tan) function, which returns the arc tangent of a coordinate or point in two-dimensional space (n1, n2) calculated as atan(n2/n1).

Syntax:

double atan2(n1,n2)

Semantics:

Example 1 - arc tan2 function

SELECT atan2(n1,n2) FROM Archery
Value of n1 Value of n2 Output
1 1 0.7853981633974483
1 sqrt(3) 1.0471975511965976
2 0 1.5707963267948966