|
SDL
2.0
|
#include "SDL_config.h"#include <stdlib.h>#include <stdio.h>#include <time.h>#include "SDL_test.h"
Include dependency graph for SDL_test_random.c: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. 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... | |
| 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 |
Definition at line 80 of file SDL_test_random.c.
References SDLTest_RandomContext::a, SDLTest_RandomContext::ah, SDLTest_RandomContext::al, SDLTest_RandomContext::c, NULL, and SDLTest_RandomContext::x.
Referenced by SDLTest_GenerateRunSeed().
| 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 |
Definition at line 41 of file SDL_test_random.c.
References SDLTest_RandomContext::a, SDLTest_RandomContext::ah, SDLTest_RandomContext::al, SDLTest_RandomContext::c, NULL, and SDLTest_RandomContext::x.
Referenced by main(), SDLTest_FuzzerInit(), and SDLTest_RandomInitTime().
| void SDLTest_RandomInitTime | ( | SDLTest_RandomContext * | rndContext | ) |
Initialize random number generator based on current system time.
| rndContext | pointer to context structure |
Definition at line 65 of file SDL_test_random.c.
References NULL, and SDLTest_RandomInit().
Referenced by main(), and SDLTest_GenerateRunSeed().