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

◆ lerp16by16()

LIB8STATIC fl::u16 lerp16by16 ( fl::u16 a,
fl::u16 b,
fract16 frac )

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

Definition at line 380 of file lib8tion.h.

381{
382 fl::u16 result;
383 if( b > a ) {
384 fl::u16 delta = b - a;
385 fl::u16 scaled = scale16(delta, frac);
386 result = a + scaled;
387 } else {
388 fl::u16 delta = a - b;
389 fl::u16 scaled = scale16( delta, frac);
390 result = a - scaled;
391 }
392 return result;
393}
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31

References LIB8STATIC.

Referenced by fl::CRGB::lerp16().

+ Here is the caller graph for this function: