MCPcopy Create free account
hub / github.com/FastLED/FastLED / test_cos_impl

Function test_cos_impl

tests/fl/math/fixed_point.cpp:640–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638
639template<typename T>
640void 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
651template<typename T>
652void test_sincos_impl(float sin_max, float cos_max) {

Callers

nothing calls this directly

Calls 2

cosFunction · 0.50
to_floatMethod · 0.45

Tested by

no test coverage detected