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

Constructs a complex object from two real objects.

Pascal
function RealToCplx(const ReVec: TOpenCLMtxVec; const ImVec: TOpenCLMtxVec): TOpenCLMtxVec; overload;

Construct a complex object from the ReVec (real part) and the ImVec (imaginary part) objects. The results are stored in the calling object. Size and TOpenCLBase.ComplexComplexproperties of the calling object are set implicitly to match ReVec and ImVec objects. An exception is raised if ReVec or ImVec TOpenCLBase.ComplexComplexproperty is True.

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