| 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 { |
no test coverage detected