#include <Randomizer.hpp>
|
| | Randomizer () |
| | Default constructor. More...
|
| |
| | Randomizer (const std::default_random_engine::result_type seed) |
| | Constructor for initialization with a custom seed. More...
|
| |
| template<typename T > |
| T | range (const T start, const T end) const |
| | Returns a random value from given distribution. More...
|
| |
| template<typename T > |
| T | operator() (const T start, const T end) const |
| | Returns a random value from given distribution. More...
|
| |
| template<typename T > |
| glm::vec2 | insideCircle (const T radius) const |
| | Get a random point within a circle. More...
|
| |
| template<typename T > |
| glm::vec3 | insideSphere (const T radius) const |
| | Get a random point within a sphere. More...
|
| |
Class for picking random values from given distribution
Definition at line 37 of file Randomizer.hpp.
| jop::Randomizer::Randomizer |
( |
| ) |
|
Default constructor.
Initializes the seed using std::random_device.
| jop::Randomizer::Randomizer |
( |
const std::default_random_engine::result_type |
seed | ) |
|
Constructor for initialization with a custom seed.
- Parameters
-
template<typename T >
| glm::vec2 jop::Randomizer::insideCircle |
( |
const T |
radius | ) |
const |
Get a random point within a circle.
- Parameters
-
| radius | Radius of the circle |
- Returns
- Random point inside a circle
template<typename T >
| glm::vec3 jop::Randomizer::insideSphere |
( |
const T |
radius | ) |
const |
Get a random point within a sphere.
- Parameters
-
| radius | Radius of the circle |
- Returns
- Random point inside a sphere
template<typename T >
| T jop::Randomizer::operator() |
( |
const T |
start, |
|
|
const T |
end |
|
) |
| const |
Returns a random value from given distribution.
- Parameters
-
| start | Starting point of distribution |
| end | Ending point of distribution |
template<typename T >
| T jop::Randomizer::range |
( |
const T |
start, |
|
|
const T |
end |
|
) |
| const |
Returns a random value from given distribution.
- Parameters
-
| start | Starting point of distribution |
| end | Ending point of distribution |
The documentation for this class was generated from the following file: