public int NextInt(int lower, int upper) { // [ lower; upper [ --> [ lower; upper ] Assert(lower < upper, "lower range cannot be bigger then upper range!"); return((int)((uint32)(RNG_XORShift.Xorshift128Plus(ref _seedBuffer)) % (uint32)(Math.Abs(upper - lower + 1)) + lower)); }
public void ReSeed() { RNG_XORShift.XorshiftPlusJump(ref _seedBuffer); }
public uint32 NextUInt32(uint32 range) { // [ 0; range [ --> [ 0; range ] return((uint32)(RNG_XORShift.Xorshift128Plus(ref _seedBuffer) % (range + 1))); }
public uint64 NextUInt64() { return(RNG_XORShift.Xorshift128Plus(ref _seedBuffer)); }