| 638 | |
| 639 | template<typename T> |
| 640 | void test_cos_impl(float cos_max) { |
| 641 | T zero; |
| 642 | FL_CHECK_CLOSE(T::cos(zero).to_float(), 1.0f, cos_max); |
| 643 | |
| 644 | T half_pi(1.5707963f); |
| 645 | FL_CHECK_CLOSE(T::cos(half_pi).to_float(), 0.0f, cos_max); |
| 646 | |
| 647 | T pi(3.1415926f); |
| 648 | FL_CHECK_CLOSE(T::cos(pi).to_float(), -1.0f, cos_max); |
| 649 | } |
| 650 | |
| 651 | template<typename T> |
| 652 | void test_sincos_impl(float sin_max, float cos_max) { |