forked from google/ink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
NoiseGenerator
to use all 64 seed bits, not just the bottom 32.
This was an oversight in the original implementation of `NoiseGenerator`. It turns out that while `std::seed_seq` will happily accept 64-bit entries, it just ignores all but the bottom 32 bits. ಠ_ಠ If you want to use 64 seed bits, you have to provide two separate 32-bit entries. Unfortunately, this change does break backwards seed compatibility for `NoiseGenerator`, which we normally don't want to ever do. If we needed another fix like this farther down the road, we'd need to do more work to make backwards compatibility possible, but fortunately nobody is relying on this yet, so it's not too late to just fix this the easy way. PiperOrigin-RevId: 718498101
- Loading branch information
1 parent
bf387a7
commit ca91c62
Showing
2 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters