Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Issue 17847 - Properly sanitize seeds for Park–Miller engines
As in XorshiftEngine, sanitizing the seed is more useful than throwing an exception. The original check was broken because it checked the seed before taking the modulus. Making this change allows unpredictableSeed to be marked nothrow and @nogc.
- Loading branch information
n8sh
authored and
n8sh
committed
Sep 21, 2017
1 parent
efae085
commit fd2e5ba
Showing
1 changed file
with
15 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