Exemple #1
0
        public static void Shuffle <T>(T[] array)
        {
            int n = array.Length;

            for (int i = 0; i < n; i++)
            {
                int idx = RandomEx.Range(i, n - 1);
                Swap(ref array[i], ref array[idx]);
            }
        }
Exemple #2
0
 public float RandomRange()
 {
     return(RandomEx.Range(min, max));
 }
Exemple #3
0
 public static double RandomRange(this Range <double> target)
 {
     return(RandomEx.Range(target.min, target.max));
 }
Exemple #4
0
 public static float RandomRange(this Range <float> target)
 {
     return(RandomEx.Range(target.min, target.max));
 }
Exemple #5
0
 public static int RandomRange(this Range <int> target)
 {
     return(RandomEx.Range(target.min, target.max));
 }
Exemple #6
0
 public float MakeRandomValue()
 {
     return(RandomEx.Range(min, max));
 }