Skip to content

Commit

Permalink
Merge pull request Turfjs#1368 from vamshi29292/master
Browse files Browse the repository at this point in the history
Resolve Turfjs#1310. Modified lineArc module.
  • Loading branch information
DenisCarriere authored May 2, 2018
2 parents bee4436 + 35e538a commit 8e0a62c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packages/turf-line-arc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ function lineArc(center, radius, bearing1, bearing2, options) {
options = options || {};
if (!isObject(options)) throw new Error('options is invalid');
var steps = options.steps;
var units = options.units;

// validation
if (!center) throw new Error('center is required');
Expand Down Expand Up @@ -59,12 +58,12 @@ function lineArc(center, radius, bearing1, bearing2, options) {
var i = 0;

while (alfa < arcEndDegree) {
coordinates.push(destination(center, radius, alfa, units).geometry.coordinates);
coordinates.push(destination(center, radius, alfa, options).geometry.coordinates);
i++;
alfa = arcStartDegree + i * 360 / steps;
}
if (alfa > arcEndDegree) {
coordinates.push(destination(center, radius, arcEndDegree, units).geometry.coordinates);
coordinates.push(destination(center, radius, arcEndDegree, options).geometry.coordinates);
}
return lineString(coordinates, properties);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-line-arc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/line-arc",
"version": "5.1.5",
"version": "5.1.6",
"description": "turf line-arc module",
"main": "main.js",
"module": "main.es.js",
Expand Down

0 comments on commit 8e0a62c

Please sign in to comment.