Man page - sdl_srand(3)
Packages contains this manual
Manual
SDL_srand
NAMEHEADER FILE
SYNOPSIS
DESCRIPTION
FUNCTION PARAMETERS
THREAD SAFETY
AVAILABILITY
SEE ALSO
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)