atan2

Overview :

The "atan2" function is used for calcution of the arc tangent(x/y) value of a given input.

Syntax :
double atan2(double x,double y);
Description :

The "atan2" function accepts 2 parameters

  • x -> The x is the numerator whose arc tangent value is to be found

  • y -> The y is the denominator whose arc tangent value is to be found

  • The atan2 function calculate the arc tangent of x/y where x is numerator and y is denominator

"atan2" function return the arc tangent value of a x/y.

Example :
#include <stdio.h>
 #include <math.h>
 #include <conio.h>

 int main()
 {
    double x,y,tan2;
	clrscr();
	printf("\nEnter the numerator : ");
	scanf("%lf",&x);
	
	printf("\nEnter the denominator : ");
	scanf("%lf",&y);	

    tan2 = atan2(x,y);
	
    printf("The atan2 value is %lf\n", tan2);
    getch();
    return 0;
}

Comments

comments powered by Disqus