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 580 of file lib8tion.h.

581{
582 uint8_t j = i;
583 if( j & 0x80 ) {
584 j = 255 - j;
585 }
586 uint8_t jj = scale8( j, j);
587 uint8_t jj2 = jj << 1;
588 if( i & 0x80 ) {
589 jj2 = 255 - jj2;
590 }
591 return jj2;
592}
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:34

References LIB8STATIC, and scale8().

Referenced by quadwave8().

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