FunctionInitialization of polar-complex numbers
Syntax C/C++#include <VecLib.h>
fPolar fpolr( float MagVal, float ArgVal );

    (similarly dpolr,   epolr)
Pascal/Delphiuses VecLib;
function fpolr( xMag, xArg:Single ): fPolar;

alternative Syntax (a bit clumsy, but slightly more efficient):
procedure fpolr( var py:fPolar; xMag, xArg:Single );

    (similarly dpolr,   epolr)
DescriptionThese functions allow to generate numbers of the three polar-complex data types fPolar, dPolar, and ePolar. CMATH offers overloaded versions of these functions for C++. See CMATH.HTM, chapter 2.1 for details.
fpolr may be used whenever temporary complex variables are needed as arguments for functions. In this case, fpolr replaces the less elegant direct assignment of the Mag and Arg parts, e.g.:
  p.Mag = 3.0; p.Arg = 1.5708;
  VPF_equC( X, size, p ); /* less convenient */
  VPF_equC( Y, size, fpolr( 3.0, 1.5708 )); /* easier */
Error handlingnone
Return valuethe generated polar-complex number
See alsofcplx

VectorLib Table of Contents  OptiVec home