The ATAN2 function in Oracle SQL / PLSQL is used to get arc tangent of a n and m.
Syntax for the ATAN2 function in Oracle SQL / PLSQL is:
SELECT ATAN2(N,M)
FROM table_name;
N and M are the numbers which are used to calculate the arc tangents.
Example 1:
SELECT ATAN2(0.4,0.6) FROM DUAL;
Will return “0.588002603547568”
Example 2:
SELECT ATAN2(0,1) FROM DUAL;
Will return “0”
Example 3:
SELECT ATAN2(-0.4,0.4) FROM DUAL;
Will return “-0.785398163397448”
Example 4:
SELECT ATAN2(-0.4,-0.4) FROM DUAL;
Will return “-2.35619449019234”