0.1.0 • Published 7 years ago
array-xy-max-y v0.1.0
array-xy-max-y
Find the maximum ordinate value in a range of abscissas.
Installation
$ npm install --save array-xy-max-y
Usage
import maxY from 'array-xy-max-y';
const points = {
x: [1, 2, 3, 4, 5, 6],
y: [10, 2, 8, 4, 5, 20]
};
const options = {
from: {index: 1},
to: {value: 5}
};
const result = maxY(points, options);
/* result -> {
index: 2,
value: 8
} */
License
0.1.0
7 years ago