| 623 | |
| 624 | template<typename T> |
| 625 | void test_sin_impl(float sin_max) { |
| 626 | T zero; |
| 627 | FL_CHECK_CLOSE(T::sin(zero).to_float(), 0.0f, sin_max); |
| 628 | |
| 629 | T half_pi(1.5707963f); |
| 630 | FL_CHECK_CLOSE(T::sin(half_pi).to_float(), 1.0f, sin_max); |
| 631 | |
| 632 | T pi(3.1415926f); |
| 633 | FL_CHECK_CLOSE(T::sin(pi).to_float(), 0.0f, sin_max); |
| 634 | |
| 635 | T neg_half_pi(-1.5707963f); |
| 636 | FL_CHECK_CLOSE(T::sin(neg_half_pi).to_float(), -1.0f, sin_max); |
| 637 | } |
| 638 | |
| 639 | template<typename T> |
| 640 | void test_cos_impl(float cos_max) { |