1.0.2 • Published 3 years ago

ml-array-xy-max-merge v1.0.2

Weekly downloads
133
License
MIT
Repository
github
Last release
3 years ago

array-xy-max-merge

NPM version npm download

Merge abscissa values on similar ordinates and keeps the abscissa with bigger ordinate value.

Installation

$ npm install --save ml-array-xy-max-merge

Usage

import maxMerge from 'ml-array-xy-max-merge';

const points = {
  x: [100.001, 100.002, 200.01, 200.02, 300.0001, 300.0002],
  y: [10, 11, 20, 21, 30, 31]
};

const merged = maxMerge(points, { groupWidth: 0.010001 });
/*
merged.x -> [100.002, 200.02, 300.0002];
merged.y -> [21, 41, 61];
*/

License

MIT

1.0.2

3 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.2.5

5 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago