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

◆ lerp8by8()

LIB8STATIC fl::u8 lerp8by8 ( fl::u8 a,
fl::u8 b,
fract8 frac )

Linear interpolation between two unsigned 8-bit values, with 8-bit fraction.

Definition at line 363 of file lib8tion.h.

364{
366 if( b > a) {
367 fl::u8 delta = b - a;
368 fl::u8 scaled = scale8( delta, frac);
369 result = a + scaled;
370 } else {
371 fl::u8 delta = a - b;
372 fl::u8 scaled = scale8( delta, frac);
373 result = a - scaled;
374 }
375 return result;
376}
unsigned char u8
Definition stdint.h:131
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31

References LIB8STATIC.

Referenced by fl::CRGB::lerp8(), and loop().

+ Here is the caller graph for this function: