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

Method lerp

src/fl/math/fixed_point.h:343–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341 // lerp(0, 10, 0.5) → 5.0
342 // lerp(0, 10, 0.25) → 2.5
343 static constexpr FASTLED_FORCE_INLINE fixed_point lerp(fixed_point a, fixed_point b, fixed_point t) FL_NOEXCEPT {
344 return from_raw(Base::lerp(a, b, t).raw());
345 }
346
347 // Clamp x to the range [lo, hi]: clamp(5.0, 0.0, 3.0) → 3.0
348 static constexpr FASTLED_FORCE_INLINE fixed_point clamp(fixed_point x, fixed_point lo, fixed_point hi) FL_NOEXCEPT {

Callers 1

FL_TEST_FILEFunction · 0.45

Calls 2

lerpFunction · 0.70
rawMethod · 0.45

Tested by

no test coverage detected