Dew Math for .NET
|
Sets angle in [-2Pi,2Pi].
ThetaRad within [-2Pi,2Pi] 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 Matrix must be real.
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|