Skip to main content

linear_interp

Function linear_interp 

Source
pub fn linear_interp(
    xs: &[f64],
    ys: &[f64],
    x: f64,
) -> Result<f64, InterpolationError>
Expand description

Piecewise-linear interpolation of (xs, ys) (xs strictly increasing) at x. Clamps to the endpoints outside the range.