Randomizer.h File Reference

#include <SFML/Config.h>

Go to the source code of this file.


Functions

CSFML_API void sfRandom_SetSeed (unsigned int Seed)
 Set the seed for the random numbers generator.
CSFML_API unsigned int sfRandom_GetSeed ()
 Get the seed used to generate random numbers the generator.
CSFML_API float sfRandom_Float (float Begin, float End)
 Get a random float number in a given range.
CSFML_API int sfRandom_Int (int Begin, int End)
 Get a random integer number in a given range.

Function Documentation

CSFML_API float sfRandom_Float ( float  Begin,
float  End 
)

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]

CSFML_API unsigned int sfRandom_GetSeed (  ) 

Get the seed used to generate random numbers the generator.

Returns:
Current seed

CSFML_API int sfRandom_Int ( int  Begin,
int  End 
)

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]

CSFML_API void sfRandom_SetSeed ( unsigned int  Seed  ) 

Set the seed for the random numbers generator.

Using a known seed allows you to reproduce the same sequence of random numbers

Parameters:
Seed : Number to use as the seed