Random number generation utilities. More...
#include <random.h>Functions | |
| void | RandomInit () |
| [Start] Initializes the random number generator | |
| int | RandInt (int min, int max) |
| [Utility] Generates a random integer within a range | |
| float | RandFloat (float min, float max) |
| [Utility] Generates a random float within a range | |
| bool | RandBool () |
| [Utility] Generates a random boolean value | |
Random number generation utilities.
Provides functions for generating random integers, floats, and booleans within specified ranges. Includes seed initialization.
| bool RandBool | ( | ) |
[Utility] Generates a random boolean value
Generates a random boolean value.
Returns either true or false with equal probability (50%).
| float RandFloat | ( | float | min, |
| float | max | ||
| ) |
[Utility] Generates a random float within a range
Generates a random float between min and max.
Creates a random floating-point value that is >= min and <= max. The distribution is uniform across the range.
| min | The minimum value (inclusive) |
| max | The maximum value (inclusive) |
| int RandInt | ( | int | min, |
| int | max | ||
| ) |
[Utility] Generates a random integer within a range
Generates a random integer between min and max (inclusive).
Creates a random integer value that is >= min and <= max. The distribution is uniform across the range.
| min | The minimum value (inclusive) |
| max | The maximum value (inclusive) |
| void RandomInit | ( | ) |
[Start] Initializes the random number generator
Initializes the random number generator.
Seeds the random number generator with a time-based value to ensure different sequences on each program run.