JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 162
  • Score
    100M100P100Q86391F
  • License MIT

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

Package Exports

  • ml-array-xy-max-merge

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ml-array-xy-max-merge) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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