C Tutorial/math.h/atan2
atan2
Item Value Header file math.h Declaration float atan2f(float a, float b);double atan2(double a, double b);long double atan2l(long double a, long double b); Return returns the arc tangent of a/b.
#include <math.h>
#include <stdio.h>
int main(void)
{
double val = -1.0;
do {
printf("Atan2 of %f is %f.\n", val, atan2(val,1.0));
val += 0.1;
} while(val<=1.0);
return 0;
}