arsa
2.7
|
Go to the source code of this file.
Classes | |
struct | SDLTest_RandomContext |
Macros | |
#define | SDLTest_RandomInt(c) ((int)SDLTest_Random(c)) |
Functions | |
void | SDLTest_RandomInit (SDLTest_RandomContext *rndContext, unsigned int xi, unsigned int ci) |
Initialize random number generator with two integers. More... | |
void | SDLTest_RandomInitTime (SDLTest_RandomContext *rndContext) |
Initialize random number generator based on current system time. More... | |
unsigned int | SDLTest_Random (SDLTest_RandomContext *rndContext) |
Initialize random number generator based on current system time. More... | |
Include file for SDL test framework.
This code is a part of the SDL2_test library, not the main SDL library.
Definition in file SDL_test_random.h.
#define SDLTest_RandomInt | ( | c | ) | ((int)SDLTest_Random(c)) |
Definition at line 54 of file SDL_test_random.h.
unsigned int SDLTest_Random | ( | SDLTest_RandomContext * | rndContext | ) |
Initialize random number generator based on current system time.
Note: ...RandomInit() or ...RandomInitTime() must have been called before using this function.
rndContext | pointer to context structure |
void SDLTest_RandomInit | ( | SDLTest_RandomContext * | rndContext, |
unsigned int | xi, | ||
unsigned int | ci | ||
) |
Initialize random number generator with two integers.
Note: The random sequence of numbers returned by ...Random() is the same for the same two integers and has a period of 2^31.
rndContext | pointer to context structure |
xi | integer that defines the random sequence |
ci | integer that defines the random sequence |
void SDLTest_RandomInitTime | ( | SDLTest_RandomContext * | rndContext | ) |
Initialize random number generator based on current system time.
rndContext | pointer to context structure |