Comparing version 0.1.2 to 0.1.3
@@ -99,3 +99,3 @@ 'use strict'; | ||
if (this.g == Math.PI) { | ||
throw new Error('it appears ' + start.view() + ' and ' + end.view() + " are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite"); | ||
throw new Error('it appears ' + this.start.view() + ' and ' + this.end.view() + " are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite"); | ||
} else if (isNaN(this.g)) { | ||
@@ -102,0 +102,0 @@ throw new Error('could not calculate great circle between ' + start + ' and ' + end); |
@@ -0,2 +1,5 @@ | ||
# v0.1.3 | ||
- Fix bug when generating string for Antipodal error | ||
# v0.1.2 | ||
@@ -3,0 +6,0 @@ |
{ | ||
"name": "arc", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "draw great circle arcs", | ||
@@ -5,0 +5,0 @@ "url": "https://github.com/springmeyer/arc.js", |
@@ -40,2 +40,17 @@ 'use strict'; | ||
test('GreatCircleException', function(t) { | ||
try { | ||
new arc.GreatCircle({ | ||
x: 1, y: 1 | ||
}, { | ||
x: -179, y: -1 | ||
}); | ||
} | ||
catch (e) { | ||
t.equal(e.toString(), "Error: it appears 1,1 and -179,-1 are 'antipodal', e.g diametrically opposite, thus " + | ||
"there is no single route but rather infinite" , "Antipodal error test"); | ||
} | ||
t.end(); | ||
}); | ||
var routes = [ | ||
@@ -42,0 +57,0 @@ [{x: -122, y: 48}, {x: -77, y: 39}, {'name': 'Seattle to DC'}], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19432
343
1