clValue.PolarToCart Method

function PolarToCart(AmpltVec: TOpenCLValue; PhaseVec: TOpenCLValue): TOpenCLValue;

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 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