Example #1
0
 internal static void GetSequentialIVsInt32(this LCRNG rng, uint seed, Span <int> ivs)
 {
     for (int i = 0; i < 6; i++)
     {
         seed   = rng.Next(seed);
         ivs[i] = (int)(seed >> 27);
     }
 }
Example #2
0
 internal static bool GetSequentialIVsUInt32(this LCRNG rng, uint seed, ReadOnlySpan <uint> IVs)
 {
     foreach (var iv in IVs)
     {
         seed = rng.Next(seed);
         var IV = seed >> 27;
         if (IV != iv)
         {
             return(false);
         }
     }
     return(true);
 }