clValue.PolarToCart Method

TOpenCLValue PolarToCart(TOpenCLValue AmpltVec, TOpenCLValue PhaseVec)

Converts the polar magnitude/phase pair to cartesian pair.

#NameTypeDescription
1AmpltVecTOpenCLValuesource TOpenCLValue
2PhaseVecTOpenCLValuesource TOpenCLValue

Returns: TOpenCLValue

Remarks:

Convert AmpltVec and PhaseVec elements (combined) from polar to cartesian form. The result is stored as a complex number (x=Re, y=Im) in the calling object. FloatPrecision and Dew.Math.clValue.Complex properties of the calling object are set implicitly to match AmpltVec and PhaseVec objects.

Examples
clValue a;
clValue b;
clValue c;
a.Copy(2); // a = new double[] {2} //magnitude
b.Copy(3); // b = new double[] {1} //phase
c.PolarToCart(a,b); // result stored in c = projections to Re and Im axis
See Also: clValue.CartToPolar