#include <RandomWrapper.h>
A simple wrapper which may be used to generate random values.
◆ CoinFlip()
| bool panga::RandomWrapper::CoinFlip |
( |
double |
probability | ) |
|
Generates a weighted coin flip with |probability| chance of producing the value true.
◆ RandomByte()
| std::byte panga::RandomWrapper::RandomByte |
( |
| ) |
|
Generates a uniformly random byte.
◆ RandomFloat()
template<typename FloatType = double>
| FloatType panga::RandomWrapper::RandomFloat |
( |
FloatType |
min, |
|
|
FloatType |
max |
|
) |
| |
|
inline |
Generates a uniformly random floating point value of type |FloatType| in the range [|min|, |max|).
◆ RandomInteger()
template<typename IntegerType = uint32_t>
| IntegerType panga::RandomWrapper::RandomInteger |
( |
IntegerType |
min, |
|
|
IntegerType |
max |
|
) |
| |
|
inline |
Generates a uniformly random integer of type |IntegerType| in the range [|min|, |max|].
The documentation for this class was generated from the following files: