singleOrNull

inline fun singleOrNull(): Vector2F?

Returns single element, or null if the array is empty or has more than one element.


inline fun singleOrNull(predicate: (Vector2F) -> Boolean): Vector2F?

Returns the single element matching the given predicate, or null if element was not found or more than one element was found.