mourner/rbush — pull request #17 by twpayne (2013-11-24 16:44:38+00:00)
Title: Fix loop condition in _allDistMargin

I think this fixes a bug in `_allDistMargin`. In the existing code, compare [the loop condition for `leftBBox`](https://github.com/mourner/rbush/blob/master/rbush.js#L405) with [the loop condition for `rightBBox`](https://github.com/mourner/rbush/blob/master/rbush.js#L411):
```javascript
for (i = m; i < M - m; i++) { // leftBBox
// ...
}
```
```javascript
for (i = M - m - 1; i >= 0; i--) { // rightBBox
// ...
}
```
The code for `rightBBox` completes more iterations. I think the code should be symmetrical with both loops completing the same number of iterations. I think the attached patch fixes this by making the `rightBBox` loop match the `leftBBox` loop.