polar
construct from polar coordinates
Synopsis
#include <complex.h>
complex_float polarf (float magnitude, float phase)
complex_double polar (double magnitude, double phase)
complex_fract16 polar_fr16 (fract16 magnitude, fract16 phase)
Description
This function transforms the polar coordinate, specified by the arguments
and
magnitude
a complex number in which the x-axis is represented by the real part, and
the y-axis by the imaginary part. The phase argument is interpreted as
radians.
For the
polar_fr16
in the range
[0x8000, 0x7ff0]
itive or negative. Positive values are interpreted as an anti-clockwise
motion around a circle with a radius equal to the magnitude as shown in
Table
4-9.
Table 4-9. Positive Phases
Phase
0.0
0.25 (0x2000)
0.50 (0x4000)
0.75 (0x6000)
0.999 (0x7ff0)
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
, into a Cartesian coordinate and returns the result as
phase
function, the phase must be scaled by 2 π and must be
. The value of the phase may be either pos-
Radians
0
π /2
π
3/2 π
<2 π
DSP Run-Time Library
4-91
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers