| 650 | |
| 651 | template<typename T> |
| 652 | void test_sincos_impl(float sin_max, float cos_max) { |
| 653 | T angle(0.7854f); // ~pi/4 |
| 654 | T s, c; |
| 655 | T::sincos(angle, s, c); |
| 656 | |
| 657 | FL_CHECK_CLOSE(s.to_float(), 0.7071f, sin_max); |
| 658 | FL_CHECK_CLOSE(c.to_float(), 0.7071f, cos_max); |
| 659 | |
| 660 | // sincos must match individual sin/cos |
| 661 | FL_CHECK_EQ(s.raw(), T::sin(angle).raw()); |
| 662 | FL_CHECK_EQ(c.raw(), T::cos(angle).raw()); |
| 663 | } |
| 664 | |
| 665 | template<typename T> |
| 666 | void test_atan_impl(float atan_max) { |