Skip to content

Commit

Permalink
Sync SDL3 wiki -> header
Browse files Browse the repository at this point in the history
  • Loading branch information
SDLWikiBot committed Jun 19, 2024
1 parent 16e69cb commit 237bbfc
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions include/SDL3/SDL_stdinc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1262,8 +1262,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_vasprintf(char **strp, SDL_PRINTF_FORMAT_STR
/**
* Seed the pseudo-random number generator.
*
* Reusing the seed number will cause SDL_rand() to repeat the same stream
* of 'random' numbers.
* 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().
Expand All @@ -1282,13 +1282,14 @@ extern SDL_DECLSPEC void SDLCALL SDL_srand(Uint64 seed);
*
* You likely want to use SDL_rand_n() to get a psuedo-randum number instead.
*
* If you want reproducible output, be sure to initialize with SDL_srand() first.
* If you want reproducible output, be sure to initialize with SDL_srand()
* first.
*
* There are no guarantees as to the quality of the random sequence produced,
* and this should not be used for security (cryptography, passwords) or where
* money is on the line (loot-boxes, casinos). There are many random number
* libraries available with different characteristics and you should pick one of
* those to meet any serious needs.
* libraries available with different characteristics and you should pick one
* of those to meet any serious needs.
*
* \returns a random value in the range of [0-SDL_MAX_UINT32].
*
Expand All @@ -1306,21 +1307,20 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_rand(void);
* Generates a pseudo-random number less than n
*
* The method used is faster and of better quality than `SDL_rand() % n`.
* However just like with `SDL_rand() % n`, bias increases with larger n.
* Odds are better than 99.9% even for n under 1 million.
* However just like with `SDL_rand() % n`, bias increases with larger n. Odds
* are better than 99.9% even for n under 1 million.
*
* Example: to simulate a d6 use `SDL_rand_n(6) + 1`
* The +1 converts 0..5 to 1..6
* Example: to simulate a d6 use `SDL_rand_n(6) + 1` The +1 converts 0..5 to
* 1..6
*
* There are no guarantees as to the quality of the random sequence produced,
* and this should not be used for security (cryptography, passwords) or where
* money is on the line (loot-boxes, casinos). There are many random number
* libraries available with different characteristics and you should pick one of
* those to meet any serious needs.
* libraries available with different characteristics and you should pick one
* of those to meet any serious needs.
*
* \param n the number of possible values
*
* \returns a random value in the range of [0 .. n-1]
* \param n the number of possible values.
* \returns a random value in the range of [0 .. n-1].
*
* \threadsafety All calls should be made from a single thread
*
Expand All @@ -1336,10 +1336,10 @@ extern SDL_DECLSPEC Uint32 SDLCALL SDL_rand_n(Uint32 n);
* There are no guarantees as to the quality of the random sequence produced,
* and this should not be used for security (cryptography, passwords) or where
* money is on the line (loot-boxes, casinos). There are many random number
* libraries available with different characteristics and you should pick one of
* those to meet any serious needs.
* libraries available with different characteristics and you should pick one
* of those to meet any serious needs.
*
* \returns a random value in the range of [0.0, 1.0)
* \returns a random value in the range of [0.0, 1.0).
*
* \threadsafety All calls should be made from a single thread
*
Expand Down

0 comments on commit 237bbfc

Please sign in to comment.