makima_spline 1.0.2

An implementation of the modified akima spline interpolation
Documentation

makima_spline

A implementation of the modified akima interpolation + additionally features linear extrapolation

HowTo

use makima_spline::Spline;

your data is in some format

let x = vec![1., 2., 3., 4., 5., 6., 7., 8.];
let y = vec![-1., -1., -1., 0.0, 1., 1., 1., 1.];

convert to the type used by the spline Vec<(f64, f64)>

let points = makima_spline::vec_to_points(&x, &y);

build the spline from the data-points

let spline = Spline::from_vec(points);

To sample do this:

let y = spline.sample(x);