1.0.6 • Published 5 years ago
simple-linear-interpolation v1.0.6
Simple Linear Interpolation
A simple interpolation module that construct new data points within the range of a discrete set of known data points. Linear Interpolation EXAMPLE.
Installation
You can install this package using NPM:
npm i simple-linear-interpolation --saveHow use
Simple example JavaScript / TypeScript:
import { linearInterpolation } from "simple-linear-interpolation";
const points = [{ x: 1, y: 1}, { x: 2, y: 2 }];
const calculate = linearInterpolation(points);
calculate({ x: 1.5 }); // y -> 1.5
calculate({ y: 1.5 }); // x -> 1.5Unit testing
For run unit tests, use:
npm run testAll unit test report you can find at report/ folder.
For run test at watch mode, use:
npm run test:devLinting
For check eslint rules, use:
npm run lintFor auto fix all eslint bugs, use:
npm run lint:fixLicense
Except where noted otherwise, files are licensed under the MIT License.