Comparing version 0.20.1 to 0.20.2
@@ -10,8 +10,8 @@ "use strict"; | ||
const count = points.length; | ||
const [x, y] = points[0]; | ||
let xmin = x; | ||
let xmax = x; | ||
let ymin = y; | ||
let ymax = y; | ||
for (let i = 1; i < count; i++) { | ||
let xmin = null; | ||
let xmax = null; | ||
let ymin = null; | ||
let ymax = null; | ||
for (let i = 0; i < count; i++) { | ||
const [x, y] = points[i]; | ||
@@ -22,2 +22,5 @@ if (isNaN(x)) { | ||
} | ||
} else if (xmin === null) { | ||
xmin = x; | ||
xmax = x; | ||
} else { | ||
@@ -31,2 +34,5 @@ if (x < xmin) xmin = x; | ||
} | ||
} else if (ymin === null) { | ||
ymin = y; | ||
ymax = y; | ||
} else { | ||
@@ -33,0 +39,0 @@ if (y < ymin) ymin = y; |
{ | ||
"name": "bbox-fns", | ||
"version": "0.20.1", | ||
"version": "0.20.2", | ||
"description": "Light-weight JavaScript Bounding Box Utility Functions", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
44419
749