Warning
This page refers to an old version of SFML. Click here to switch to the latest version.
Warning
This page refers to an old version of SFML. Click here to switch to the latest version.
Randomizer is an utility class for generating pseudo-random numbers. More...
#include <SFML/System/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 |
Get the seed used to generate random numbers the generator.
|
static |
Get a random float number in a given range.
|
static |
Get a random integer number in a given range.
|
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 |