FastLED 3.9.15
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages

◆ dim8_lin()

LIB8STATIC uint8_t dim8_lin ( uint8_t x)

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

Definition at line 716 of file scale8.h.

716 {
717 if (x & 0x80) {
718 x = scale8(x, x);
719 } else {
720 x += 1;
721 x /= 2;
722 }
723 return x;
724}
int x
Definition Audio.ino:71
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:40

References LIB8STATIC, scale8(), and x.

+ Here is the call graph for this function: