This namespace contains some faster but less accurate version of the trigonomic functions and a faster version of the fmod function.
| double WorldBuilder::FT::fast_sin_d |
( |
const double |
angle | ) |
|
|
inline |
Fast sin function, accurate for values between 0 and pi. The implementation is based on discussion at https://stackoverflow.com/a/6104692.
The accuracy seem good enough for most purposes. The unit test tests in steps of 0.01 from -4 pi to 4 pi and compares against the std sin function and the difference is always smaller than 1.2e-5. If the test is run with intervals of 0.001 then there are 12 entries which are (very slightly) above that (<3e-8) at angles of about -174, -6, 6 and 174.
Definition at line 66 of file point.h.