![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|

Functions | |
| CFixed_15_16 | atan2_approx (CFixed_15_16 y, CFixed_15_16 x) |
| Inaccurate approximation of atan2 over fixed-point numbers. More... | |
| void | sincos_approx (CFixed_15_16 a, CFixed_15_16 &sin_out, CFixed_15_16 &cos_out) |
| Compute sin(a) and cos(a). More... | |
| CFixed_15_16 atan2_approx | ( | CFixed_15_16 | y, |
| CFixed_15_16 | x | ||
| ) |
Inaccurate approximation of atan2 over fixed-point numbers.
Maximum error is almost 0.08 radians (4.5 degrees).
| void sincos_approx | ( | CFixed_15_16 | a, |
| CFixed_15_16 & | sin_out, | ||
| CFixed_15_16 & | cos_out | ||
| ) |
Compute sin(a) and cos(a).
Maximum error for -2pi < a < 2pi is almost 0.0005.