Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix poor randomness properties of first call to `Rand.next()`. #2321
The current implementations of XorOshiro128Plus and XorShift128Plus return the sum of input seed values for the first value, which is unsafe. Rather than telling people to discard the first value, skip past it in the actual implementation.
This commit also fixes the documentation of current implementations for consistency with the Random trait.