Adelsbach/VSIPL
Core +DP Programming Reference Guide
DD-00017-015
Core +DP

2.1.6 vsip_rect_p - Convert Polar to Cartesian Coordinates

vsip_cscalar_f vsip_rect_f(vsip_scalar_f radius, vsip_scalar_f theta); 
vsip_cscalar_d vsip_rect_d(vsip_scalar_d radius, vsip_scalar_d theta);
Description

This function converts polar coordinates (magnitude and phase angle) to a complex scalar in Cartesian coordinates (real and imaginary parts). The function computes the Cartesian coordinates from polar coordinates using Euler’s formula:

real= radius·cos(theta)

imag =radius·sin(theta)

The phase angle should be provided in radians.

Parameters
Return Value