SDL Library
SDL_test_random.h File Reference
Include file for SDL test framework. More...
Go to the source code of this file.
Functions | |
void | SDLTest_RandomInit (SDLTest_RandomContext *rndContext, unsigned int xi, unsigned int ci) |
Initialize random number generator with two integers. | |
void | SDLTest_RandomInitTime (SDLTest_RandomContext *rndContext) |
Initialize random number generator based on current system time. | |
unsigned int | SDLTest_Random (SDLTest_RandomContext *rndContext) |
Initialize random number generator based on current system time. |
Detailed Description
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.
Function Documentation
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.
- Parameters:
-
rndContext pointer to context structure
- Returns:
- A random number (32bit unsigned integer)
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.
- Parameters:
-
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.
- Parameters:
-
rndContext pointer to context structure
Generated on Tue Jul 12 2022 15:10:21 by 1.7.2