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
4
namespace
fl
{
5
6
// Global default random number generator instance
7
// Use function with static local to avoid global constructor
8
fl_random
&
default_random
() {
9
static
ThreadLocal<fl_random>
instance;
10
return
instance.
access
();
11
}
12
13
}
// namespace fl
fl::ThreadLocalFake::access
T & access()
Definition
thread_local.h:190
fl::fl_random
A random number generator class that wraps FastLED's random functions.
Definition
random.h:20
fl::default_random
fl_random & default_random()
Global default random number generator instance.
Definition
random.cpp:8
fl::ThreadLocal
ThreadLocalFake< T > ThreadLocal
Definition
thread_local.h:27
fl
IMPORTANT!
Definition
crgb.h:20
random.h
thread_local.h
fl
random.cpp
Generated on Fri Aug 22 2025 20:59:33 for FastLED by
1.13.2