You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TOpenCLValue Class > TOpenCLValue Methods > TOpenCLValue.RealToCplx Method
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TOpenCLValue.RealToCplx Method

Constructs a complex object from two real objects.

Syntax
C#
Visual Basic
public TOpenCLValue RealToCplx(TOpenCLValue ReVec, TOpenCLValue ImVec);

Construct a complex object from the ReVec (real part) and the ImVec (imaginary part) objects. The result is stored in the calling object. FloatPrecision 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.

using Dew.Math; using Dew.Math.Units; namespace Dew.Examples() { void Example() { TOpenCLValue a,b,c; clMtxVec.CreateIt(out a, out b, out c); try { a.Copy(2); b.Copy(3); c.RealToCplx(a,b); //c = 2+3i } finally { clMtxVec.FreeIt(ref a, ref b, ref c); } } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!