randomOrNull

inline fun randomOrNull(): Vector2I?

Returns a random element from this array, or null if this array is empty.


inline fun randomOrNull(random: Random): Vector2I?

Returns a random element from this array using the specified source of randomness, or null if this array is empty.