lastOrNull

inline fun lastOrNull(): Vector2I?

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


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

Returns the last element matching the given predicate, or null if no such element was found.