Guardian C Library Calls Reference Manual

atan2
3-8 128833Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
atan2
The atan2 function computes the arc tangent of the quotient of its arguments.
divid
is an expression of type double, specifying the dividend.
divis
is an expression of type double, specifying the divisor.
Return Value
is the arc tangent of (divid/divis), expressed as a double value in the range -pi to +pi
radians. If both arguments are zero, atan2 returns the value HUGE_VAL and sets
errno to EDOM (a domain error).
Example
This example prints “The arc tangent is .927295.
#include <mathh>
#include <stdioh>
int main(void)
{
double y, x, r;
y = 4.0;
x = 3.0;
r = atan2(y,x);
printf("The arc tangent is %f.", r);
}
#include <mathh>
double atan2(double divid, double divis);