16-bit quadratic ease-in / ease-out function.
C implementation at this point.
Definition at line 625 of file lib8tion.h.
626{
627 uint16_t j = i;
628 if( j & 0x8000 ) {
629 j = 65535 - j;
630 }
632 uint16_t jj2 = jj << 1;
633 if( i & 0x8000 ) {
634 jj2 = 65535 - jj2;
635 }
636 return jj2;
637}
LIB8STATIC uint16_t scale16(uint16_t i, fract16 scale)
Scale a 16-bit unsigned value by an 16-bit value, which is treated as the numerator of a fraction who...
References LIB8STATIC, and scale16().