sf::Randomizer Class Reference
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. |
Detailed Description
Randomizer is an utility class for generating pseudo-random numbers.Definition at line 40 of file Randomizer.hpp.
Member Function Documentation
unsigned int sf::Randomizer::GetSeed | ( | ) | [static] |
Get the seed used to generate random numbers the generator.
- Returns:
- Current seed
Definition at line 67 of file Randomizer.cpp.
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]
Definition at line 88 of file Randomizer.cpp.
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]
Definition at line 76 of file Randomizer.cpp.
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
Definition at line 57 of file Randomizer.cpp.
The documentation for this class was generated from the following files:
:: Copyright © 2007-2008 Laurent Gomila, all rights reserved :: Documentation generated by doxygen 1.5.2 ::