Ejemplo n.º 1
0
 /// <summary> Select a random element index from the set. </summary>
 public static int FirstRandomIndex <T>(this ReadOnlySet <T> set)
 => UnityEngine.Random.Range(0, set.Count);
Ejemplo n.º 2
0
 /// <summary> Select a random element from the set. </summary>
 public static T FirstRandom <T>(this ReadOnlySet <T> set)
 => set.ElementAtOrDefault(FirstRandomIndex(set));