WARNING : this is the documentation for an old version of SFML. The documentation for the latest official release is available through the main menu.
WARNING : this is the documentation for an old version of SFML. The documentation for the latest official release is available through the main menu.
Randomizer is an utility class for generating pseudo-random numbers. More...
#include <Randomizer.hpp>
Static Public Member Functions | |
| 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.
| static int sf::Randomizer::Random | ( | int | Begin, |
| int | End | ||
| ) | [static] |
Get a random integer number in a given range.
| static float sf::Randomizer::Random | ( | float | Begin, |
| float | End | ||
| ) | [static] |
Get a random float number in a given range.
| 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
| Seed | : Number to use as the seed |