Example #1
0
    // Token: 0x06000228 RID: 552 RVA: 0x0000A730 File Offset: 0x00008930
    private uint RangeUInt32Uniform(uint maxExclusive)
    {
        if (maxExclusive == 0U)
        {
            throw new ArgumentOutOfRangeException("Range cannot have size of zero.");
        }
        int  num  = Xoroshiro128Plus.CalcRequiredBits(maxExclusive);
        int  num2 = 32 - num;
        uint num3;

        do
        {
            num3 = this.nextUint >> num2;
        }while (num3 >= maxExclusive);
        return(num3);
    }
Example #2
0
    // Token: 0x06000227 RID: 551 RVA: 0x0000A6F8 File Offset: 0x000088F8
    private ulong RangeUInt64Uniform(ulong maxExclusive)
    {
        if (maxExclusive == 0UL)
        {
            throw new ArgumentOutOfRangeException("Range cannot have size of zero.");
        }
        int   num  = Xoroshiro128Plus.CalcRequiredBits(maxExclusive);
        int   num2 = 64 - num;
        ulong num3;

        do
        {
            num3 = this.nextUlong >> num2;
        }while (num3 >= maxExclusive);
        return(num3);
    }