pub fn linear_interp(xs: &[f64], ys: &[f64], x: f64) -> f64
Piecewise linear interpolation of (xs, ys) at x, flat beyond the ends. xs must be sorted strictly increasing.
(xs, ys)
x
xs