Atan2, atan2f, Atof, atoff, Atan2, atan2f atof, atoff – Zilog ZUSBOPTS User Manual
Page 438: Example, Synopsis, Returns

Standard Functions
UM017105-0511
410
Zilog Developer Studio II – ZNEO™
User Manual
Example
double y=.1234;
double x;
x=atan(y);
atan2, atan2f
Computes the principal value of the arc tangent of y/x, using the signs of both arguments
to determine the quadrant of the return value. A domain error occurs if both arguments are
zero.
Synopsis
#include
double atan2(double y, double x);
float atan2f(float y, float x);
Returns
The arc tangent of y/x, in the range [-pi, +pi].
Example
double y=.1234;
double x=.4321;
double z;
z=atan2(y,x);
atof, atoff
Converts the string pointed to by nptr to double representation. Except for the behavior on
error,
atof
is equivalent to
strtod (nptr, (char **)NULL)
, and
atoff
is equiva-
lent to
strtof (nptr, (char **)NULL
).
Synopsis
#include
double atof(const char *nptr);
float atoff(const char *nptr);
Returns
The converted value.