mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-28 23:49:12 +00:00
Added SDL_srand(), SDL_rand(), and SDL_rand_r() (thanks @JKaniarz!)
These are simple random functions that should not be used for serious random number generation. Fixes https://github.com/libsdl-org/SDL/issues/4968
This commit is contained in:
parent
9cb4bb92f6
commit
d1d484ddbe
23 changed files with 203 additions and 89 deletions
|
@ -989,6 +989,8 @@ SDL_DYNAPI_PROC(double,SDL_pow,(double a, double b),(a,b),return)
|
|||
SDL_DYNAPI_PROC(float,SDL_powf,(float a, float b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_qsort,(void *a, size_t b, size_t c, SDL_CompareCallback d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_qsort_r,(void *a, size_t b, size_t c, SDL_CompareCallback_r d, void *e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_rand,(void),(),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_rand_r,(Uint64 *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_realloc,(void *a, size_t b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_round,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(float,SDL_roundf,(float a),(a),return)
|
||||
|
@ -999,6 +1001,7 @@ SDL_DYNAPI_PROC(double,SDL_sin,(double a),(a),return)
|
|||
SDL_DYNAPI_PROC(float,SDL_sinf,(float a),(a),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_sqrt,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(float,SDL_sqrtf,(float a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_srand,(Uint64 a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_strcasecmp,(const char *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_strcasestr,(const char *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_strchr,(const char *a, int b),(a,b),return)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue