Consider points on the edge of the rectangle as inside

This commit is contained in:
Patrick Niklaus 2014-07-01 01:30:51 +02:00
parent 8108ecc4d3
commit bc013925b8

View File

@ -200,8 +200,8 @@ class StaticRTree
inline bool Contains(const FixedPointCoordinate &location) const
{
const bool lats_contained = (location.lat > min_lat) && (location.lat < max_lat);
const bool lons_contained = (location.lon > min_lon) && (location.lon < max_lon);
const bool lats_contained = (location.lat >= min_lat) && (location.lat <= max_lat);
const bool lons_contained = (location.lon >= min_lon) && (location.lon <= max_lon);
return lats_contained && lons_contained;
}