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

◆ cubicwave8()

LIB8STATIC uint8_t cubicwave8 ( uint8_t in)

Cubic waveform generator.

Spends visibly more time at the limits than "sine" does. Spends just a little more time at the limits than "sine" does.

S-shaped wave generator (like "sine"). Useful for turning a one-byte "counter" value into a one-byte oscillating value that moves smoothly up and down, with an "acceleration" and "deceleration" curve.

This is even faster than "sin8()", and has a slightly different curve shape.

Definition at line 773 of file lib8tion.h.

774{
775 return ease8InOutCubic( triwave8( in));
776}
LIB8STATIC fract8 ease8InOutCubic(fract8 i)
8-bit cubic ease-in / ease-out function.
Definition lib8tion.h:642
LIB8STATIC uint8_t triwave8(uint8_t in)
Triangle wave generator.
Definition lib8tion.h:746

References ease8InOutCubic(), LIB8STATIC, and triwave8().

+ Here is the call graph for this function: