sdlSrand function stdinc

void sdlSrand(
  1. int seed
)

Seeds the pseudo-random number generator.

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

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

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

\since This function is available since SDL 3.2.0.

\sa SDL_rand \sa SDL_rand_bits \sa SDL_randf

extern SDL_DECLSPEC void SDLCALL SDL_srand(Uint64 seed)

Implementation

void sdlSrand(int seed) {
  final sdlSrandLookupFunction = _libSdl
      .lookupFunction<Void Function(Uint64 seed), void Function(int seed)>(
        'SDL_srand',
      );
  return sdlSrandLookupFunction(seed);
}