FastLED 3.9.15
Loading...
Searching...
No Matches

◆ lerpLut()

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

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

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

References fl::fixed_point< IntBits, FracBits, S >::raw().

Referenced by convert(), and convert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: