Utility namespace for random number generation.
More...
|
| int | Range (int min, int max) |
| | Generates a random integer in the range [min, max].
|
| |
| double | Range (double min, double max) |
| | Generates a random floating-point number in the range [min, max].
|
| |
| std::string | UUID () |
| | Generates a random UUID v4.
|
| |
| std::mt19937 & | GetGenerator () |
| | Gets the random number generator instance.
|
| |
Utility namespace for random number generation.
◆ GetGenerator()
| std::mt19937 & Random::GetGenerator |
( |
| ) |
|
Gets the random number generator instance.
- Returns
- A reference to the Mersenne Twister generator
- Note
- Internal function used by other namespace functions
◆ Range() [1/2]
| double Random::Range |
( |
double | min, |
|
|
double | max ) |
Generates a random floating-point number in the range [min, max].
- Parameters
-
| min | The minimum value (inclusive) |
| max | The maximum value (inclusive) |
- Returns
- A random float between min and max
◆ Range() [2/2]
| int Random::Range |
( |
int | min, |
|
|
int | max ) |
Generates a random integer in the range [min, max].
- Parameters
-
| min | The minimum value (inclusive) |
| max | The maximum value (inclusive) |
- Returns
- A random integer between min and max
◆ UUID()
| std::string Random::UUID |
( |
| ) |
|
Generates a random UUID v4.
- Returns
- A string representing the UUID in 8-4-4-4-12 format