Ejemplo n.º 1
0
        public void TestUIntRange()
        {
            const uint min = 3, max = 6;
            var        range = new URange(min, max);

            test(rng => rng.nextUIntInRangeT(range), min, max, range.ToImmutableHashSet().some());
        }
Ejemplo n.º 2
0
 public uint nextUIntInRange(URange range, out Rng newState) =>
 ulongToUIntInRange(range, nextULong(out newState));
Ejemplo n.º 3
0
 public Tpl <Rng, uint> nextUIntInRangeT(URange range) =>
 nextUIntT.map2(v => ulongToUIntInRange(range, v));
Ejemplo n.º 4
0
 public static Fn <Rng, Tpl <Rng, uint> > nextUIntInRangeS(URange range) =>
 rng => rng.nextUIntInRangeT(range);
Ejemplo n.º 5
0
 static uint ulongToUIntInRange(URange range, ulong v) =>
 range.from + (uint)(v % (range.to - range.from + 1));