binarySearchComparator

typealias binarySearchComparator = (a: Any, b: Any) -> Double(source)

A function used to compare two items while performing a binary search.

function compareNumbers(a, b) {
return a - b;
}

Parameters

a

An item in the array.

b

The item being searched for.