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

Constructs a complex object from two real objects.

Pascal
function RealToCplx(ReVec: TOpenCLMtxVec; 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 Complex properties of the calling object are set implicitly to match ReVec and ImVec objects. An exception is raised if ReVec or ImVec Complex property is True.

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