cubic-spline-browserified
Version:
spline interpolation
14 lines (13 loc) • 373 B
TypeScript
declare class Spline {
readonly xs: number[];
readonly ys: number[];
readonly ks: Float64Array;
constructor(xs: number[], ys: number[]);
getNaturalKs(ks: Float64Array): Float64Array;
/**
* inspired by https://stackoverflow.com/a/40850313/4417327
*/
getIndexBefore(target: number): number;
at(x: number): number;
}
export = Spline;