turf-distance
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -9,6 +9,6 @@ //http://en.wikipedia.org/wiki/Haversine_formula | ||
var dLat = toRad(coordinates2[0] - coordinates1[0]) | ||
var dLon = toRad(coordinates2[1] - coordinates1[1]) | ||
var lat1 = toRad(coordinates1[1]) | ||
var lat2 = toRad(coordinates2[1]) | ||
var dLat = toRad(coordinates2[1] - coordinates1[1]) | ||
var dLon = toRad(coordinates2[0] - coordinates1[0]) | ||
var lat1 = toRad(coordinates1[0]) | ||
var lat2 = toRad(coordinates2[0]) | ||
var a = Math.sin(dLat/2) * Math.sin(dLat/2) + | ||
@@ -15,0 +15,0 @@ Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2) |
{ | ||
"name": "turf-distance", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "turf distance module", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,3 +9,3 @@ var test = require('tape') | ||
} | ||
var pt2 = { | ||
var pt2 = { | ||
"type": "Feature", | ||
@@ -16,5 +16,5 @@ "geometry": {"type": "Point", "coordinates": [-75.534, 39.123]} | ||
var dist = distance(pt1, pt2, 'miles') | ||
t.ok(dist, 'should return a distance') | ||
t.ok(dist, 'should return a distance') | ||
t.end() | ||
}) |
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
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
3621