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

◆ random16() [2/3]

LIB8STATIC uint16_t random16 ( uint16_t lim)

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

Parameters
limthe upper bound for the result, exclusive

Definition at line 78 of file random8.h.

78 {
79 uint16_t r = random16();
80 uint32_t p = (uint32_t)lim * (uint32_t)r;
81 r = p >> 16;
82 return r;
83}
LIB8STATIC uint16_t random16()
Generate a 16-bit random number.
Definition random8.h:54
static FASTLED_NAMESPACE_BEGIN uint8_t const p[]
Definition noise.cpp:56

References LIB8STATIC, p, and random16().

+ Here is the call graph for this function: