Skip to main content

find_interval

Function find_interval 

Source
pub fn find_interval(locations: &[f32], input: f32) -> i32
Expand description

Binary search to find the interval start: largest i where locations[i] <= input.

Returns -1 if input is before all locations.