function PolarToCart(AmpltVec: TOpenCLValue; PhaseVec: TOpenCLValue): TOpenCLValue;
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 clValue.Complex properties of the calling object are set implicitly to match AmpltVec and PhaseVec objects.
Examples
var a,b,c: clValue;
begin
a.Copy(2); // a = [2] //magnitude
b.Copy(3); // b = [1] //phase
c.PolarToCart(a,b); // result stored in c = projections to Re and Im axis
end;
See Also: clValue.CartToPolar