Finds an item in a sorted array.
    
    
    
    
    
    
        
| Name | Type | Description | 
|---|---|---|
| array | Array | The sorted array to search. | 
| itemToFind | Object | The item to find in the array. | 
| comparator | binarySearch~Comparator | The function to use to compare the item to elements in the array. | 
Returns:
    The index of 
        
    
    
itemToFind in the array, if it exists.  If itemToFind
       does not exist, the return value is a negative number which is the bitwise complement (~)
       of the index before which the itemToFind should be inserted in order to maintain the
       sorted order of the array.
Example:
// Create a comparator function to search through an array of numbers.
function comparator(a, b) {
    return a - b;
};
var numbers = [0, 2, 4, 6, 8];
var index = Cesium.binarySearch(numbers, 6, comparator); // 3Type Definitions
- 
    
    A function used to compare two items while performing a binary search.Name Type Description aObject An item in the array. bObject The item being searched for. Returns:Returns a negative value ifais less thanb, a positive value ifais greater thanb, or 0 ifais equal tob.Example:function compareNumbers(a, b) { return a - b; }
