Zrythm
a highly automated and intuitive digital audio workstation

Various algorithms. More...
Go to the source code of this file.
Functions  
HOT NONNULL void *  algorithms_binary_search_nearby (const void *key, const void *base, size_t nmemb, size_t size, GenericCmpFunc cmp_func, bool return_prev, bool include_equal) 
Binary search with the option to find the closest member in a sorted array.  
Various algorithms.
Definition in file algorithms.h.
HOT NONNULL void * algorithms_binary_search_nearby  (  const void *  key, 
const void *  base,  
size_t  nmemb,  
size_t  size,  
GenericCmpFunc  cmp_func,  
bool  return_prev,  
bool  include_equal ) 
Binary search with the option to find the closest member in a sorted array.
All of the parameters except the following are the same as the C std bsearch().
return_prev  True to return previous closest element, false for next. 
include_equal  Include equal elements (if an exact match is found, return it). 