Skip to content
Related Articles

Related Articles

ATN2() Function in SQL Server
  • Last Updated : 29 Sep, 2020

In this article, we are going to cover the ATN2()function in which we will see how we can get the arc tangent of two given numbers. Let’s discuss one by one.

// here val1 and val2 are input.
Input  : ATN2(val1, val2)     
Output : Arc tangent result.

ATN2() :
It is the function that returns the arc tangent of two numbers.

Syntax :

ATN2(val1, val2)

Parameter :
This method accepts two-parameters as mentioned above and described below.

  • val1, val2:
    It is the two numeric values to calculate the arc tangent.

Returns –
It returns the arc tangent of two numbers.

Example-1 :
When the arguments hold the positive number.

SELECT ATN2(2.53, 5.6);

Output :


Example-2 :
When the arguments hold the negative number.

SELECT ATN2(-2.53, -5.6);

Output :


Example-3 :
When the PI() function passing one of the arguments.


Output :


Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :