Registry / Library

library · v0.1.1
Piecewise Interp
Linearly interpolate between sorted strictly increasing knots, extending constant values past both ends. Supply matching nonempty arrays.
Use Piecewise Interp
use vendor::piecewise_interp::piecewise_interp;
Run the example
nest demo piecewise_interp@0.1.1
blyxc native-run piecewise_interp-demo/main.blyx
Example source and expected output
use vendor::piecewise_interp::piecewise_interp;
fn main() {
println!(piecewise_interp([0,4,8],[1,5,9],2.0));
}
Expected output
3
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.1 | Download ZIP · Browse files | cb4733e1c4 | 0d7daaed1d18394e24950d23bf8122bfd3abe92dddabdd29151eb273ca5d57ad |
| 0.1.0 | Download ZIP · Browse files | 6349f23784 | 7fe0de126070fdb52b2023805e39daab47e3e38443f022b76950774f40833ebe |