TVec::FixAngle Method

Overload List

#SignatureDescription
1TMtxVec *FixAngle();Sets angle in [-2PI,2PI].
2TMtxVec *FixAngle(int Index, int Len);FixAngle for calling object complex elements [Index]..[Index+Len-1] in-place.
3TMtxVec *FixAngle(TMtxVec *Src);Sets angle in [-2PI,2PI] for all Src elements.
4TMtxVec *FixAngle(TMtxVec *Src, int SrcIndex, int Index, int 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].

Overload 1: TMtxVec *FixAngle();

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

Returns: ThetaRad within -2Math387::PI and Math387::PI interval.

Remarks:

Calling this function prior to passing the value to trigonometric functions can significantly improve numerical accuracy. For arguments larger than 10000, the computation of sine/cosine is speeded up by about 10x for SSE2/SSE3. The performance gains for classic FPU math are also significant. The cost of this function call is approx 30% of the cost of the sine function.

It is important to mention that the sine/cosine appear within many other functions especially complex versions of trigonometric functions. FixAngle method is never used implicitely within TMtxVec 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.

Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler

Overload 2: TMtxVec *FixAngle(int Index, int Len);

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

#NameTypeDescription
1Indexint
2Lenint
Remarks:

An exception is raised if calling object TVec::Complex property is True or if array borders are overrun/underrun.

Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler

Overload 3: TMtxVec *FixAngle(TMtxVec *Src);

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

#NameTypeDescription
1SrcTMtxVec *
Remarks:

Stores the results in the calling object. Size and TVec::Complex properties of the calling vector are set implicitly to match the Src object.

Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler

Overload 4: TMtxVec *FixAngle(TMtxVec *Src, int SrcIndex, int Index, int 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
1SrcTMtxVec *
2SrcIndexint
3Indexint
4Lenint
Remarks:

Size and TVec::Complex properties of the calling object must be set explicitly. An exception is raised if TVec::ConditionCheck is True and array borders are overrun.

Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler