TOpenCLValue PolarToCart(TOpenCLValue AmpltVec, TOpenCLValue PhaseVec)
Converts the polar magnitude/phase pair to cartesian pair.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AmpltVec | TOpenCLValue | source TOpenCLValue |
| 2 | PhaseVec | TOpenCLValue | source 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