1.0.9 β’ Published 3 years ago
@dmytropaduchak/simple-bilinear-interpolation v1.0.9
πΊπ¦ HELP UKRAINE
GOOD EVENING WE ARE FROM UKRAINE.
We fight for democratic values, for freedom, for our future. We need your support. There are dozen ways to help us, JUST DO IT.
Simple Bilinear Interpolation
A simple interpolation module that construct new data points within the range of a discrete set of known data points. Bilinear Interpolation EXAMPLE.
Installation
You can install this package using NPM:
npm i @dmytropaduchak/simple-bilinear-interpolation --saveHow use
Simple example JavaScript / TypeScript:
import { bilinearInterpolation } from "@dmytropaduchak/simple-bilinear-interpolation";
const points = [{ x: 1, y: 1, z: 11 }, { x: 2, y: 1, z: 12 }, { x: 1, y: 2, z: 21 }, { x: 2, y: 2, z: 22 }];
const calculate = bilinearInterpolation(points);
calculate({ x: 1.5, y: 1.5 }); // z -> 16.5
calculate({ x: 1.5, z: 16.5 }); // y -> 1.5
calculate({ y: 1.5, z: 16.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.