Randomizer is an utility class for generating pseudo-random numbers.
More...
#include <Randomizer.hpp>
|
static void | SetSeed (unsigned int Seed) |
| Set the seed for the generator.
|
|
static unsigned int | GetSeed () |
| Get the seed used to generate random numbers the generator.
|
|
static float | Random (float Begin, float End) |
| Get a random float number in a given range.
|
|
static int | Random (int Begin, int End) |
| Get a random integer number in a given range.
|
|
Randomizer is an utility class for generating pseudo-random numbers.
Definition at line 40 of file Randomizer.hpp.
static unsigned int sf::Randomizer::GetSeed |
( |
| ) |
|
|
static |
Get the seed used to generate random numbers the generator.
- Returns
- Current seed
static float sf::Randomizer::Random |
( |
float |
Begin, |
|
|
float |
End |
|
) |
| |
|
static |
Get a random float number in a given range.
- Returns
- Start : Start of the range
-
End : End of the range
-
Random number in [Begin, End]
static int sf::Randomizer::Random |
( |
int |
Begin, |
|
|
int |
End |
|
) |
| |
|
static |
Get a random integer number in a given range.
- Returns
- Start : Start of the range
-
End : End of the range
-
Random number in [Begin, End]
static void sf::Randomizer::SetSeed |
( |
unsigned int |
Seed | ) |
|
|
static |
Set the seed for the generator.
Using a known seed allows you to reproduce the same sequence of random number
- Parameters
-
Seed | : Number to use as the seed |
The documentation for this class was generated from the following file: