firstOrNull

inline fun firstOrNull(): Vector2I?

Returns the first element, or null if the array is empty.


inline fun firstOrNull(predicate: (Vector2I) -> Boolean): Vector2I?

Returns the first element matching the given predicate, or null if element was not found.