NextInt() публичный Метод

Generates a random int over the range 0 to int.MaxValue, inclusive. This method differs from Next() only in that the range is 0 to int.MaxValue and not 0 to int.MaxValue-1. The slight difference in range means this method is slightly faster than Next() but is not functionally equivalent to System.Random.Next().
public NextInt ( ) : int
Результат int
Пример #1
0
        /// <summary>
        /// Initialises a new instance using a seed generated from the class's static seed RNG.
        /// </summary>
        public FastRandom()
        {
            DisplaySeed();
            int nextSeed = __seedRng.NextInt();

            // Reinitialise(__seedRng.NextInt());
            Reinitialise(nextSeed);
        }
Пример #2
0
        /// <summary>
        /// Initialises a new instance using a seed generated from the class's static seed RNG.
        /// </summary>
        public FastRandom()
        {
            int nextSeed = __seedRng.NextInt();

            // Reinitialise(__seedRng.NextInt());
            Reinitialise(nextSeed);
            //UnityEngine.Debug.Log("FastRandom original seed " + seed0);
            //UnityEngine.Debug.Log("FastRandom initialize seed " + nextSeed);
        }
Пример #3
0
 /// <summary>
 /// Initialises a new instance using a seed generated from the class's static seed RNG.
 /// </summary>
 public FastRandom()
 {
     Reinitialise(__seedRng.NextInt());
 }