TOpenCLValue ImagPart(TOpenCLValue Vec)
Gets the imaginary part of a complex value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLValue | source TOpenCLValue |
Returns: TOpenCLValue
Remarks:
Gets the imaginary part of a complex value Vec and stores the real result in the calling object. FloatPrecision and Dew.Math.TOpenCLBase.Complex properties of the calling object are set implicitly to match Vec object. Vec Dew.Math.TOpenCLBase.Complex must be true otherwise the exception will be raised.
Examples
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
TOpenCLValue a,b;
clMtxVec.CreateIt(out a, out b);
try
{
b.Copy(Cplx(8));
a.ImagPart(b); // a = 0
}
finally
{
clMtxVec.FreeIt(ref a, ref b);
}
}
}
See Also: TOpenCLValue.RealPart, TOpenCLValue.RealToCplx