## Atan2 / Atan2l Function >> Math.h >> Header Files in C

Atan2 :

1. Interpret it as – A tan 2
2. ‘2’ Means It Takes Two Parameters
3. The atan2() function computes the arc tangent of Y/X
4. Signs of the arguments is used to compute the quadrant of the return value .

Syntax :

```double atan2(double y,double x);

Return Value : Double [ Arc Tangent of Ratio Y/X ]
No Of Parameters : 2
Double X : Floating point value representing an X-Co-Ordinate
Double Y : Floating point value representing an Y-Co-Ordinate

Live Example :
#include< stdio.h> #include< math.h> int main(void) {    double res;    double x = 90.0, y = 45.0;    res = atan2(y, x);    printf("The arc tangent ratio of %lf is %lfn",(y/x),res);    return 0; }
Output :
The arc tangent ratio of 0.500000 is 0.463648
How to Convert Number into Degree : Using Following Statement –
result = atan2(y,x)*180/M_PI;

var disqus_config = function () {
this.page.url = PAGE_URL;  // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://programmingtutorials.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
})();

Previous Page

Next Page