TOpenCLValue *PolarToCart(TOpenCLValue *AmpltVec, TOpenCLValue *PhaseVec) const;
Converts the polar magnitude/phase pair to cartesian pair.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AmpltVec | TOpenCLValue * | |
| 2 | PhaseVec | 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
#include "clMtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
clValue a, b, c;
a.Copy(2); // a = [2] //magnitude
b.Copy(3); // b = [3] //phase
c.PolarToCart(a, b); // result stored in c = projections to Re and Im axis
}
See Also: clValue::CartToPolar
Declared in Dew::Math::clValue · Dew.Math/clMtxExpr.h · Cross-compiler