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 80 of file random8.h.

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

References LIB8STATIC, p, and random16().

+ Here is the call graph for this function: