clValue::ImagPart Method

TOpenCLValue *ImagPart(TOpenCLValue *Vec) const;

Gets the imaginary part of a complex object.

#NameTypeDescription
1VecTOpenCLValue *
Remarks:

Gets the imaginary part of a complex object Vec and stores the real result in the calling object. FloatPrecision and clValue::Complex properties of the calling object are set implicitly to match Vec object. Vec clValue::Complex must be true otherwise an exception will be raised.

Examples
#include "Units.Math387.h"
#include "clMtxExpr.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::Math387;

void Example()
{
    clValue a, b;

    b.Copy(Cplx(8));
    a.ImagPart(b);  // a = 0
}
See Also: clValue::RealPart, clValue::RealToCplx
Declared in Dew::Math::clValue · Dew.Math/clMtxExpr.h · Cross-compiler