Skip to content

Commit

Permalink
Gibe better syntax to a function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean Bertrand committed Nov 23, 2016
1 parent b4ca3ce commit cd141e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/geometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ var randomPointInPolygon = function(polygon, bbox) {
};

var randomPointInBbox = function(bbox) {
return { lat: Math.random() * (bbox._northEast.lat - bbox._southWest.lat) + bbox._southWest.lat, lng: Math.random() * (bbox._northEast.lng - bbox._southWest.lng) + bbox._southWest.lng }
var lat = Math.random() * (bbox._northEast.lat - bbox._southWest.lat) + bbox._southWest.lat;
var lng = Math.random() * (bbox._northEast.lng - bbox._southWest.lng) + bbox._southWest.lng;
return { lat: lat, lng: lng };
};

var insidePolygon = function(point, polygon) {
Expand Down

0 comments on commit cd141e5

Please sign in to comment.