11#ifndef SLMADSP_RANDOM_H
12#define SLMADSP_RANDOM_H
29 template <RandomEngineType Engine>
43 template <NumericType T>
45 Distribution<T> distribution{ range.min, range.max };
46 const auto res = distribution(m_rng);
53 using Distribution = std::conditional_t<std::is_floating_point_v<T>,
54 std::uniform_real_distribution<T>,
55 std::uniform_int_distribution<T>>;
A class for (pseudo) random number generation.
Definition marvin_Random.h:30
T generate(Range< T > range) noexcept
Definition marvin_Random.h:44
RandomGenerator(std::random_device &rd)
Utility helper functions and classes.
Definition marvin_Utils.h:21
RandomGenerator< std::mt19937 > Random
Definition marvin_Random.h:60
POD type that represents a range of values, for classes requiring a min and a max.
Definition marvin_Range.h:21