FastLED 3.10.8
Loading...
Searching...
No Matches

◆ easeOutQuad8()

u8 fl::easeOutQuad8 ( u8 i)

8-bit quadratic ease-out function Takes an input value 0-255 and returns an eased value 0-255 The curve starts fast and decelerates (ease-out only)

Definition at line 108 of file ease.cpp.hpp.

108 {
109 // ease-out is the inverse of ease-in: 1 - (1-t)²
110 // For 8-bit: y = MAX - (MAX-i)² / MAX
111 constexpr u16 MAX = 0xFF;
112 u32 d = MAX - i; // (MAX - i)
113 u32 num = d * d + (MAX >> 1); // (MAX-i)² + rounding
114 return u8(MAX - (num / MAX));
115}
unsigned char u8
Definition stdint.h:131

References FL_NO_EXCEPT.

Referenced by ease8(), and ease8().

+ Here is the caller graph for this function: