-
-
Notifications
You must be signed in to change notification settings - Fork 12
struct RandomXorshift
Kelvin edited this page Jun 11, 2017
·
1 revision
A cryptographically unsecure 128-bit Xorshift pseudo-random number generator.
The maximum unsigned integer value the random number generator is capable of producing.
Generates a pseudo-random 32 bit unsigned integer, and advances the random number generator state.
Generates a pseudo-random 32 bit unsigned integer less than
maximum
, and advances the random number generator state. This function should be preferred over using the plaingenerate()
method with the modulo operator to avoid modulo biasing. However, ifmaximum
is a power of two, a bit mask may be faster.