FastLED 3.9.15
Loading...
Searching...
No Matches
random.cpp
Go to the documentation of this file.
1#include "fl/random.h"
2#include "fl/thread_local.h"
3
4namespace fl {
5
6// Global default random number generator instance
7// Use function with static local to avoid global constructor
9 static ThreadLocal<fl_random> instance;
10 return instance.access();
11}
12
13} // namespace fl
A random number generator class that wraps FastLED's random functions.
Definition random.h:20
fl_random & default_random()
Global default random number generator instance.
Definition random.cpp:8
ThreadLocalFake< T > ThreadLocal
IMPORTANT!
Definition crgb.h:20