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

◆ dim8_lin()

LIB8STATIC uint8_t dim8_lin ( uint8_t x)

Linear version of the dimming function that halves for values < 128.

Definition at line 721 of file scale8.h.

721 {
722 if (x & 0x80) {
723 x = scale8(x, x);
724 } else {
725 x += 1;
726 x /= 2;
727 }
728 return x;
729}
int x
Definition simple.h:92
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, scale8(), and x.

+ Here is the call graph for this function: