Function SDL_srand
pub unsafe extern "C" fn SDL_srand(seed: u64)
Available on crate feature
dep_sdl3
only.Expand description
Seeds the pseudo-random number generator.
Reusing the seed number will cause SDL_rand_*() to repeat the same stream of ‘random’ numbers.
§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.