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

◆ random8() [2/3]

LIB8STATIC fl::u8 random8 ( fl::u8 lim)

Generate an 8-bit random number between 0 and lim.

Parameters
limthe upper bound for the result, exclusive

Definition at line 70 of file random8.h.

70 {
71 fl::u8 r = random8();
72 r = (r * lim) >> 8;
73 return r;
74}
LIB8STATIC fl::u8 random8() FL_NOEXCEPT
Generate an 8-bit random number.
Definition random8.h:53
unsigned char u8
Definition stdint.h:131

References FL_NOEXCEPT, LIB8STATIC, and random8().

+ Here is the call graph for this function: