Skip to content

Commit

Permalink
Merge pull request #17 from twpayne/fix-all-dist-margin
Browse files Browse the repository at this point in the history
Fix loop condition in _allDistMargin
  • Loading branch information
mourner committed Nov 24, 2013
2 parents 4aa0ef3 + 8c7e4af commit aaebbf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rbush.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ rbush.prototype = {
margin += this._margin(leftBBox);
}

for (i = M - m - 1; i >= 0; i--) {
for (i = M - m - 1; i >= m; i--) {
child = node.children[i];
this._extend(rightBBox, node.leaf ? this.toBBox(child) : child.bbox);
margin += this._margin(rightBBox);
Expand Down

0 comments on commit aaebbf0

Please sign in to comment.