Atan2 :
- Interpret it as - A tan 2
- '2' Means It Takes Two Parameters
- The atan2() function computes the arc tangent of Y/X
- Signs of the arguments is used to compute the quadrant of the return value .
- Header File : Math.h
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
Output :#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 %lf\n",(y/x),res); return 0; }
How to Convert Number into Degree :The arc tangent ratio of 0.500000 is 0.463648
Using Following Statement -
result = atan2(y,x)*180/M_PI;

0 comments
Post a Comment
Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email