Rng.fromState constructor

Rng.fromState(
  1. int a,
  2. int b,
  3. int c,
  4. int d,
)

Raw state constructor (tests and known-answer vectors). The all-zero state is forbidden and replaced by (1, 0, 0, 0).

Implementation

Rng.fromState(int a, int b, int c, int d)
  : _a = ((a | b | c | d) & _m32) == 0 ? 1 : a & _m32,
    _b = b & _m32,
    _c = c & _m32,
    _d = d & _m32;