C Run-Time Library Reference
atan2
arc tangent of quotient
Synopsis
#include <math.h>
double atan2 (double x, double y);
float atan2f (float x, float y);
fract16 atan2 (fract16 x, fract16 y);
Description
The
function computes the arc tangent of the input value
atan2
by input value
The
atan2_fr16
(
to
0x8000
0x7FFF)
sponds to a scaling by π compared to the floating-point function. The
input argument is in radians.
Error Conditions
The
function returns a zero if x = 0 and y <> 0.
atan2
Example
#include <math.h>
double a;
float b;
a = atan2 (0.0, 0.5);
b = atan2f (1.0, 0.0);
See Also
atan,
tan
3-32
. The output, in radians, is in the range [-π, π].
y
function uses the full range from -π/4 to π/4
for both input and output arguments. This corre-
/* the error condition: a = 0.0 */
/* b =
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
π
/2
for ADSP-219x DSPs
divided
x
*/
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers