single

Returns the single element.

Throws

if the array has more than one element.

if the array is empty.


inline fun single(predicate: (Vector2F) -> Boolean): Vector2F

Returns the single element matching the given predicate.

Throws

if the array contains more than one matching element.

if the array contains no element matching the predicate.