SDL_srand(3)

NAME
SDL_srand - 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)