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

◆ random16() [2/3]

LIB8STATIC fl::u16 random16 ( fl::u16 lim)

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

Parameters
limthe upper bound for the result, exclusive

Definition at line 87 of file random8.h.

87 {
88 fl::u16 r = random16();
89 fl::u32 p = (fl::u32)lim * (fl::u32)r;
90 r = p >> 16;
91 return r;
92}
LIB8STATIC fl::u16 random16() FL_NOEXCEPT
Generate a 16-bit random number.
Definition random8.h:63

References FL_NOEXCEPT, LIB8STATIC, and random16().

+ Here is the call graph for this function: