FastLED 3.10.8
Loading...
Searching...
No Matches

◆ lerpLut()

u16 fl::Gamma8Impl::lerpLut ( const fl::ufixed_point< 8, 8 > & fp) const
inlineprivate

Definition at line 447 of file ease.cpp.hpp.

447 {
448 u16 raw = fp.raw();
449 u8 idx = static_cast<u8>(raw >> 8); // integer part (LUT index)
450 u8 frac = static_cast<u8>(raw & 0xFF); // fractional part (0-255)
451 u16 a = mLut[idx];
452 u16 b = (idx < 255) ? mLut[idx + 1] : mLut[idx];
453 i32 diff = static_cast<i32>(b) - static_cast<i32>(a);
454 return static_cast<u16>(a + ((diff * frac) >> 8));
455 }
FASTLED_FORCE_INLINE constexpr RawType raw() const FL_NO_EXCEPT
unsigned char u8
Definition stdint.h:131

References fl::FL_NO_EXCEPT.

Referenced by convert(), and convert().

+ Here is the caller graph for this function: