pub fn nearest(x: &[f64], at: f64) -> Option<usize>
The index of the sample nearest at, when there is one.
at
x must be sorted ascending. A query outside the sampled span answers the end nearest it.
x