nextRaw32 method

  1. @override
int nextRaw32()
override

Generates a non-negative random integer uniformly distributed in the range from 0 to 0xFFFFFFFF, both inclusive.

For individual algorithms, these boundaries may actually differ. For example, algorithms in the Xorshift family never return zero.

It is the raw output of the generator.

Implementation

@override
int nextRaw32() {
  _state = (_state + 0x6D2B79F5) & 0xFFFFFFFF;
  int z = _state;
  z = (((z ^ (z >> 15))) * (z | 1)) & 0xFFFFFFFF; // does not work on JS!
  z ^= z + (z ^ (z >> 7)) * (z | 61);
  z &= 0xFFFFFFFF;
  return z ^ (z >> 14);
}