You are here: Symbol Reference > clMtxVec Namespace > Classes > TOpenCLMtxVec Class > public > ImagPart Method > TOpenCLMtxVec.ImagPart Method (TOpenCLMtxVec)
MtxVec VCL
ContentsIndex
PreviousUpNext
TOpenCLMtxVec.ImagPart Method (TOpenCLMtxVec)

Gets the imaginary part of a complex object.

Pascal
function ImagPart(const Vec: TOpenCLMtxVec): TOpenCLMtxVec; overload;

Gets the imaginary part of a complex object Vec and stores the real results in the calling object. Size and TOpenCLBase.ComplexComplexproperties of the calling object are set implicitly to match Vec object. Vec TOpenCLBase.ComplexComplexmust be true otherwise the exception will be raised.

var a,b: TOpenCLVector; begin CreateIt(a,b); try a.CopyCplxFromArray(TSingleArray.Create(1,2,3,4)); // a= [1+2i, 3+4i] b.ImagPart(a); // b = [2, 4] finally FreeIt(a,b); end; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!