SDL_srand - Man Page
Seeds the pseudo-random number generator.
Header File
Defined in SDL3/SDL_stdinc.h
Synopsis
#include "SDL3/SDL.h" void SDL_srand(Uint64 seed);
Description
Reusing the seed number will cause SDL_rand_ *() to repeat the same stream of 'random' numbers.
Function Parameters
- seed
the value to use as a random number seed, or 0 to use SDL_GetPerformanceCounter ().
Thread Safety
This should be called on the same thread that calls SDL_rand *()
Availability
This function is available since SDL 3.2.0.
See Also
·(3), SDL_rand(3), ·(3), SDL_rand_bits(3), ·(3), SDL_randf(3)
Referenced By
SDL_rand(3), SDL_rand_bits(3), SDL_randf(3).
SDL 3.2.2 Simple Directmedia Layer SDL3 FUNCTIONS