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

◆ ease8InOutQuad()

LIB8STATIC uint8_t ease8InOutQuad ( uint8_t i)

8-bit quadratic ease-in / ease-out function.

Takes around 13 cycles on AVR.

Definition at line 418 of file lib8tion.h.

419{
420 uint8_t j = i;
421 if( j & 0x80 ) {
422 j = 255 - j;
423 }
424 uint8_t jj = scale8( j, j);
425 uint8_t jj2 = jj << 1;
426 if( i & 0x80 ) {
427 jj2 = 255 - jj2;
428 }
429 return jj2;
430}
LIB8STATIC_ALWAYS_INLINE uint8_t scale8(uint8_t i, fract8 scale)
Scale one byte by a second one, which is treated as the numerator of a fraction whose denominator is ...
Definition scale8.h:44

References LIB8STATIC, and scale8().

Referenced by quadwave8().

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