Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxVec FixAngle | Sets angle in [-2PI,2PI]. |
| └ indexed: TMtxVec FixAngle(Int32 Index, Int32 Len) | ||
| 2 | TMtxVec FixAngle(TMtxVec Src) | Sets angle in [-2PI,2PI] for all Src elements. |
| └ indexed: TMtxVec FixAngle(TMtxVec Src, Int32 SrcIndex, Int32 Index, Int32 Len) |
Overload 1: TMtxVec 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.
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.
Indexed: TMtxVec FixAngle(Int32 Index, Int32 Len)
FixAngle for calling object complex elements [Index]..[Index+Len-1] in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Int32 | start index |
| 2 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
An exception is raised if calling object Dew.Math.TMtxVec.Complex property is True or if array borders are overrun/underrun.
Overload 2: TMtxVec FixAngle(TMtxVec Src)
Sets angle in [-2PI,2PI] for all Src elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec | source TVec or TMtx |
Result: stored in self (calling object), returns self for chaining
Stores the results in the calling object. Size and Dew.Math.TMtxVec.Complex properties of the calling vector are set implicitly to match the Src object.
Indexed: TMtxVec FixAngle(TMtxVec 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].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVec | source TVec or TMtx |
| 2 | SrcIndex | Int32 | source start index |
| 3 | Index | Int32 | start index |
| 4 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Size and Dew.Math.TMtxVec.Complex properties of the calling object must be set explicitly. An exception is raised if Dew.Math.TMtxVecBase.ConditionCheck is True and array borders are overrun.