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

◆ random8() [1/3]

u8 fl::fl_random::random8 ( )
inline

Generate an 8-bit random number.

Returns
A random 8-bit unsigned integer (0-255)

Definition at line 109 of file random.h.

109 {
110 u16 r = next_random16();
111 // return the sum of the high and low bytes, for better mixing
112 return (u8)(((u8)(r & 0xFF)) + ((u8)(r >> 8)));
113 }
u16 next_random16()
Generate next 16-bit random number using this instance's seed.
Definition random.h:27
unsigned char u8
Definition int.h:17

References next_random16().

Referenced by random8(), and random8().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: