Permalink
Browse files

Merge pull request #1 from aseldawy/master

Fixed a bug with RTree that causes two nodes to have the same child upon a split.
  • Loading branch information...
2 parents 2f710a3 + 201c5b3 commit 0360ea895d961bd5899aed12b922cecc648ce69d @rweeks committed Nov 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/com/newbrightidea/util/RTree.java
@@ -446,7 +446,7 @@ else if (nn[0].children.size() > nn[1].children.size())
nMinUb = n;
}
}
- float sep = (nMaxLb == nMinUb) ? 0.0f :
+ float sep = (nMaxLb == nMinUb) ? -1.0f :
Math.abs((dimMinUb - dimMaxLb) / (dimUb - dimLb));
if (sep >= bestSep)
{

0 comments on commit 0360ea8

Please sign in to comment.