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

Function test_smoothstep_impl

tests/fl/math/fixed_point.cpp:744–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

742
743template<typename T>
744void test_smoothstep_impl(float smoothstep_max) {
745 FL_CHECK_CLOSE(T::smoothstep(T(0.0f), T(1.0f), T(-0.5f)).to_float(), 0.0f, smoothstep_max);
746 FL_CHECK_CLOSE(T::smoothstep(T(0.0f), T(1.0f), T(1.5f)).to_float(), 1.0f, smoothstep_max);
747 FL_CHECK_CLOSE(T::smoothstep(T(0.0f), T(1.0f), T(0.5f)).to_float(), 0.5f, smoothstep_max);
748}
749
750template<typename T>
751void test_to_float_impl(float epsilon, float epsilon_large) {

Callers

nothing calls this directly

Calls 3

smoothstepFunction · 0.85
TEnum · 0.85
to_floatMethod · 0.45

Tested by

no test coverage detected