FastLED
3.9.15
Loading...
Searching...
No Matches
random.cpp.hpp
Go to the documentation of this file.
1
#include "
fl/math/random.h
"
2
#include "
fl/stl/singleton.h
"
3
#include "
fl/stl/mutex.h
"
4
5
namespace
fl
{
6
7
namespace
{
8
9
struct
LockedRandom
{
10
fl::mutex
mtx
;
11
math::random
rng
;
12
};
13
14
}
// namespace
15
16
math::random
&
default_random
() {
17
return
Singleton<LockedRandom>::instance
().rng;
18
}
19
20
}
// namespace fl
fl::Singleton::instance
static T & instance() FL_NOEXCEPT
Definition
singleton.h:41
fl::math::random
A random number generator class that wraps FastLED's random functions.
Definition
random.h:25
mutex.h
Platform-independent mutex interface.
fl::anonymous_namespace{random.cpp.hpp}::LockedRandom::rng
math::random rng
Definition
random.cpp.hpp:11
fl::anonymous_namespace{random.cpp.hpp}::LockedRandom::mtx
fl::mutex mtx
Definition
random.cpp.hpp:10
fl::anonymous_namespace{random.cpp.hpp}::LockedRandom
Definition
random.cpp.hpp:9
fl::default_random
math::random & default_random()
Global default random number generator instance.
Definition
random.cpp.hpp:16
fl::mutex
fl::platforms::mutex mutex
Definition
mutex.h:20
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
random.h
singleton.h
fl
math
random.cpp.hpp
Generated on Tue Jun 16 2026 00:06:59 for FastLED by
1.13.2