|
4 | 4 | // │ / /_\ \| __ \\__ \ _/ ___\| | \/ ___/ │ \\ |
5 | 5 | // │ / | \ \_\ \/ __ \\ \___| | /\___ \ │ \\ |
6 | 6 | // │ \____|__ /___ (____ /\___ >____//____ > │ \\ |
7 | | -// │ \/ \/ \/ \/ \/ v1.0.1 │ \\ |
| 7 | +// │ \/ \/ \/ \/ \/ v1.0.2 │ \\ |
8 | 8 | // │ │ \\ |
9 | 9 | // │ Fast, efficient, cross platform, cross precision, maths library. │ \\ |
10 | 10 | // │ │ \\ |
@@ -214,7 +214,7 @@ public static void Negate (ref Fixed32 f, out Fixed32 result) { |
214 | 214 | result.numerator = -f.numerator; |
215 | 215 | Int32 sr = result.numerator >> (32 - 1); // sign of result |
216 | 216 | // Branchless saturation - the only input that can overflow is MinValue |
217 | | - // as there is no +ve equivalent, in this case saturate to MaxValue. |
| 217 | + // as there is no positive equivalent, in this case saturate to MaxValue. |
218 | 218 | result.numerator = (result.numerator & ~(sr & s)) | ((sr & s) & Int32.MaxValue); |
219 | 219 | } |
220 | 220 |
|
@@ -283,7 +283,7 @@ public static void Abs (ref Fixed32 f, out Fixed32 result) { |
283 | 283 | result.numerator -= s; |
284 | 284 | Int32 sr = result.numerator >> (32 - 1); // sign of result |
285 | 285 | // Branchless saturation - the only input that can overflow is MinValue |
286 | | - // as there is no +ve equivalent, in this case saturate to MaxValue. |
| 286 | + // as there is no positive equivalent, in this case saturate to MaxValue. |
287 | 287 | result.numerator = (result.numerator & ~(sr & s)) | ((sr & s) & Int32.MaxValue); |
288 | 288 | } |
289 | 289 |
|
@@ -364,7 +364,7 @@ public static void ArcCos (ref Fixed32 f, out Fixed32 result) { |
364 | 364 | } |
365 | 365 |
|
366 | 366 | public static void ArcTan (ref Fixed32 f, out Fixed32 result) { |
367 | | - // ArcTan approximation implemented using appropriate Tayor series expansion: https://proofwiki.org/wiki/Power_Series_Expansion_for_Real_Arctangent_Function |
| 367 | + // ArcTan approximation implemented using appropriate Tayor series expansion: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf |
368 | 368 | // best accuracy for which falls within the range of -1 <= f <= 1, see: https://spin.atomicobject.com/2012/04/24/implementing-advanced-math-functions/ |
369 | 369 | // Valid input for the ArcTan function falls within the range of -∞ < f < ∞, |
370 | 370 | // trig identities are used to facilitate performing the approximation within the most accurate range: https://en.wikipedia.org/wiki/Inverse_trigonometric_functions |
|
0 commit comments