DOKK / manpages / debian 13 / libsdl3-doc / SDL_srand.3.en
SDL_srand(3) SDL3 FUNCTIONS SDL_srand(3)

SDL_srand - Seeds the pseudo-random number generator.

Defined in SDL3/SDL_stdinc.h

#include "SDL3/SDL.h"
void SDL_srand(Uint64 seed);

Reusing the seed number will cause SDL_rand () to repeat the same stream of 'random' numbers.

the value to use as a random number seed, or 0 to use SDL_GetPerformanceCounter ().

This should be called on the same thread that calls SDL_rand ()

This function is available since SDL 3.2.0.

(3), SDL_rand(3), (3), SDL_rand_bits(3), (3), SDL_randf(3)

SDL 3.2.10 Simple Directmedia Layer