line-interpolate-points
Advanced tools
Comparing version 0.0.4 to 1.0.0
{ | ||
"name": "line-interpolate-points", | ||
"version": "0.0.4", | ||
"version": "1.0.0", | ||
"description": "Exposes a function to interpolate any number of points along a multi-segment line (LineString).", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,3 +13,3 @@ [](https://nodei.co/npm/line-interpolate-points/) | ||
The module exports a single function, `interpolateLineRange( ctrlPoints, number )`; `ctrlPoints` is an array of 2D | ||
point objects, like `[ { x: 5, y: 10 }, { x: 7, y: 10 }, { x: 14, y: 13 } ]`, while `number` is the number of points to | ||
point arrays, like `[ [ 5, 10 ], [ 7, 10 ], [ 14, 13 ] ]`, while `number` is the number of points to | ||
interpolate (the endpoints included). | ||
@@ -19,10 +19,9 @@ | ||
> var interpolateLineRange = require( 'line-interpolate-points' ) | ||
> interpolateLineRange( [ { x: 3, y: 10 }, { x: 4, y: 10 } ], 2 ) | ||
[ { x: 3, y: 10 }, | ||
{ x: 4, y: 10 } ] | ||
> interpolateLineRange( [ { x: 3, y: 10 }, { x: 4, y: 10 } ], 4 ) | ||
[ { x: 3, y: 10 }, | ||
{ x: 3.3333333333333335, y: 10 }, | ||
{ x: 3.666666666666667, y: 10 }, | ||
{ x: 4, y: 10 } ] | ||
> interpolateLineRange( [ [ 3, 10 ], [ 4, 10 ] ], 2 ) | ||
[ [ 3, 10 ], [ 4, 10 ] ] | ||
> interpolateLineRange( [ [ 3, 10 ], [ 4, 10 ] ], 4 ) | ||
[ [ 3, 10 ], | ||
[ 3.3333333333333335, 10 ], | ||
[ 3.666666666666667, 10 ], | ||
[ 4, 10 ] ] | ||
``` | ||
@@ -38,4 +37,4 @@ | ||
Please fork and pull request against upstream master on a feature branch. Pretty please: provide unit tests and script | ||
fixtures in the `test` directory. | ||
Please fork and pull request against upstream master on a feature branch. Please provide unit tests and script fixtures | ||
in the `test` directory. | ||
@@ -42,0 +41,0 @@ ### Running Unit Tests |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
20297
49