Function pos_search

Source
pub fn pos_search(x: f64, xs: &[f64]) -> usize
Expand description

Finds the position for interpolation in a sorted array.

Returns the index of the largest element in xs that is less than x, clamped to the valid range [0, xs.len() - 1].