Пример #1
0
        public override ulong Next()
        {
            uint next = PrngMsvcrtBase.NextState(this._State);

            this._State = next;
            return(next >> 16);   // & 0x7FFF
        }
Пример #2
0
 protected static uint NextFromState(uint state)
 {
     return(PrngMsvcrtBase.NextState(state) >> 16);   // & 0x7FFF
 }
Пример #3
0
 private static uint NextFromState(uint state, uint limit)
 {
     return(unchecked ((uint)(((ulong)(PrngMsvcrtBase.NextState(state) >> 16) * limit) / _OutputDivisor)));  // & 0x7FFF after >> 16
 }