fcplxdcplxecplx
FunctionInitialization of cartesian-complex numbers
Syntax C/C++#include <VecLib.h>
fComplex fcplx( float ReVal, float ImVal );

    (similarly dcplx,   ecplx)
Pascal/Delphiuses VecLib;
function fcplx( xRe, xIm: Single ): fComplex;

alternative Syntax (a bit clumsy, but slightly more efficient):
procedure fcplx( var zy:fComplex; xRe, xIm: Single );

    (similarly dcplx,   ecplx)
DescriptionThese functions allow to generate complex numbers of the three cartesian data types fComplex, dComplex, and eComplex. CMATH offers overloaded versions of these functions for C++. See CMATH.HTM, chapter 2.1 for details.
fcplx may be used whenever temporary complex variables are needed as arguments for functions. In this case, fcplx replaces the less elegant direct assignment of the real and imaginary parts, e.g.:
  z.Re = 3.0; z.Im = 4.0;
  VCF_equC( X, size, z ); /* less convenient */
  VCF_equC( Y, size, fcplx( 3.0, 4.0 )); /* easier */
Error handlingnone
Return valuethe generated complex number
See alsofpolr

VectorLib Table of Contents  OptiVec home