getOrElse

inline fun getOrElse(index: Int, defaultValue: (Int) -> Vector2I): Vector2I

Returns an element at the given index or the result of calling the defaultValue function if the index is out of bounds of this array.