Adelsbach/VSIPL
Core Programming Reference Guide
DD-00016-015
Core

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);
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