-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More SDL_rand fixes #10064
More SDL_rand fixes #10064
Conversation
What's the use case for SDL_rand_bits()? |
Everything else we don't implement. Like rand_double(). Or rand_Sint64(). Or if someone wants to verify my testing with PractRand. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, can you squash the test changes to a single commit, once the tests pass?
@slouken The two commits that didn't build happened because those files weren't referenced in the Xcode project (and ctrl-f didn't show them to me) Is that an issue with the project file? Also, I believe this PR is all set. |
From @madebr src/dynapi/SDL_dynapi.sym still contains SDL_rand_r and is slightly unsorted around SDL_rand |
|
Merged, thanks! |
Renamed SDL_rand() to SDL_rand_bits to avoid confusion with std::rand()
Description
Deliberately removed SDL_rand() to force users to use SDL_rand_n() like they should. Added SDL_rand_bits() for the few who need it.
Existing Issue(s)
I was unable to built the tests on my machine. Please run them.