pub fn linear_interp( xs: &[f64], ys: &[f64], x: f64, ) -> Result<f64, InterpolationError>
Piecewise-linear interpolation of (xs, ys) (xs strictly increasing) at x. Clamps to the endpoints outside the range.
(xs, ys)
x