TOpenCLMatrix.FixAngle Method

Overload List

#SignatureDescription
1TOpenCLMtxVec FixAngleSets angle in [-2PI,2PI].
└ indexed: TOpenCLMtxVec FixAngle(Int32 Index, Int32 Len)
2TOpenCLMtxVec FixAngle(TOpenCLMtxVec Src)Sets angle in [-2PI,2PI] for all Src elements.
└ indexed: TOpenCLMtxVec FixAngle(TOpenCLMtxVec Src, Int32 SrcIndex, Int32 Index, Int32 Len)

Overload 1: TOpenCLMtxVec FixAngle

Sets angle in [-2PI,2PI].

Result: stored in self (calling object), returns self for chaining

Returns: ThetaRad within -2Dew.Math.Units.Math387.PI and Dew.Math.Units.Math387.PI interval.

Remarks:

Calling this function prior to passing the value to trigonometric functions can significantly improve numerical accuracy.

Sine/cosine appear within many other functions especially complex versions of trigonometric functions. FixAngle method is not used implicitely within TOpenCLMtxVec methods. To achieve maximum performance make sure that the arguments passed to complex trigonometric functions are "small" or scaled down.

Note
The vector must be real.

Indexed: TOpenCLMtxVec FixAngle(Int32 Index, Int32 Len)

FixAngle for calling object complex elements [Index]..[Index+Len-1] in-place.

#NameTypeDescription
1IndexInt32start index
2LenInt32element count

Result: stored in self (calling object), returns self for chaining

Remarks:

An exception is raised if calling object Dew.Math.TOpenCLBase.Complex property is True or if array borders are overrun/underrun.

Overload 2: TOpenCLMtxVec FixAngle(TOpenCLMtxVec Src)

Sets angle in [-2PI,2PI] for all Src elements.

#NameTypeDescription
1SrcTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix

Result: stored in self (calling object), returns self for chaining

Remarks:

Stores the results in the calling object. Size and Dew.Math.TOpenCLBase.Complex properties of the calling vector are set implicitly to match the Src object.

Indexed: TOpenCLMtxVec FixAngle(TOpenCLMtxVec Src, Int32 SrcIndex, Int32 Index, Int32 Len)

Sets angle in [-2PI,2PI] for Src elements [SrcIndex]..[SrcIndex+Len-1] and store the results in the calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1SrcTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2SrcIndexInt32source start index
3IndexInt32start index
4LenInt32element count

Result: stored in self (calling object), returns self for chaining

Remarks:

Size and Dew.Math.TOpenCLBase.Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun.