|
TTS v4.0.0
The Tiny Test System
|
Functions | |
| template<typename T> | |
| T | tts::random_value (T mini, T maxi) |
| Generates a random value between two bounds. | |
| void | tts::set_random_seed (std::uint64_t seed) |
| Sets the seed for the internal PRNG to guarantee reproducibility. | |
| T tts::random_value | ( | T | mini, |
| T | maxi ) |
#include <tts/tools/random.hpp>
Generates a random value between two bounds.
This function generates a random value of type T between the specified mini and maxi bounds using an uniform distribution for integral types and a log-uniform distribution for floating-point types.
| mini | Lower bound for the random value generation. |
| maxi | Upper bound for the random value generation. |
|
inline |
#include <tts/tools/random.hpp>
Sets the seed for the internal PRNG to guarantee reproducibility.
| seed | The 64-bit seed value to initialize the generator state. |