FastLED 3.10.6
Loading...
Searching...
No Matches

◆ offset()

static FASTLED_FORCE_INLINE u8 fl::BinaryDither::offset ( u8 q,
u8 range )
inlinestatic

Q scaled into [0, range): the offset for one channel.

Definition at line 138 of file binary_dither.h.

138 {
139 u8 d = fl::scale8(q, range);
140#if (FASTLED_SCALE8_FIXED == 1)
141 // Adjust for the fixed scale8's rounding up.
142 if (d) { --d; }
143#endif
144 return d;
145 }
unsigned char u8
Definition stdint.h:131

References FASTLED_FORCE_INLINE, and fl::FL_NO_EXCEPT.

Referenced by init(), and reseed().

+ Here is the caller graph for this function: