0.1.0 • Published 6 years ago

@mishguru/interpolate v0.1.0

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

interpolate

Interpolate takes a list of points and finds the best guess of where data would lie given the mean of the Y value using a 'best guess' method.

Interpolate works by taking your points, parsing them from the right, and finding the first place where the average Y fits between two points. It is really only useful for very specific circumstances although Pull Requests are welcome if you would like to see this functionality extended.

Installation

npm install @mishguru/interpolate

Usage

The best way to figure out how to use this library is to look at src/index.spec.js file.

import interpolate from '@mishguru/interpolate'

const points = [{ x: 1, y: 2 }, { x: 3, y: 4 }]
const result = interpolate(points)
result.x === 2 //true
result.y === 3
0.1.0

6 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago