summaryrefslogtreecommitdiff
path: root/db/geo
diff options
context:
space:
mode:
authorgregs <greg@10gen.com>2011-07-08 16:20:37 -0400
committergregs <greg@10gen.com>2011-07-27 12:37:46 -0400
commit6ce2ed33329ea9d9ca9e21448096728f7d1428ea (patch)
tree464e29ff30a5a5d8114a3e34acf0fa79d3ea8e3b /db/geo
parent1a1233fd6711985956712e93b09ac72d23e15af6 (diff)
downloadmongo-6ce2ed33329ea9d9ca9e21448096728f7d1428ea.tar.gz
only need to search until box is 1/2 width, our completion scan will catch the rest
Diffstat (limited to 'db/geo')
-rw-r--r--db/geo/2d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/geo/2d.cpp b/db/geo/2d.cpp
index c85f8b0350a..65ea23c8281 100644
--- a/db/geo/2d.cpp
+++ b/db/geo/2d.cpp
@@ -2233,7 +2233,7 @@ namespace mongo {
_fudge = _g->_error;
_wantLen = _fudge +
std::max( ( _want._max._x - _want._min._x ) ,
- ( _want._max._y - _want._min._y ) );
+ ( _want._max._y - _want._min._y ) ) / 2;
ok();
}
@@ -2308,7 +2308,7 @@ namespace mongo {
uassert( 14030, "polygon must be defined by three points or more", _poly.size() >= 3 );
_bounds = _poly.bounds();
- _maxDim = _bounds.maxDim();
+ _maxDim = _bounds.maxDim() / 2;
ok();
}