Exemple #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);
     }
 }
Exemple #2
0
 internal static int[] GetSequentialIVsInt32(this LCRNG rng, uint seed)
 {
     int[] ivs = new int[6];
     for (int i = 0; i < 6; i++)
     {
         seed   = rng.Next(seed);
         ivs[i] = (int)(seed >> 27);
     }
     return(ivs);
 }
Exemple #3
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);
 }