From: Peter Sadrozinski Date: Wed, 16 Apr 2014 14:18:13 +0000 (-0400) Subject: fix for sgGetBuckets. Northern most buckets in the bounding box were left out X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=85b17ae8d4588312a1a82cd767c7150a13a00598;p=simgear.git fix for sgGetBuckets. Northern most buckets in the bounding box were left out --- diff --git a/simgear/bucket/newbucket.cxx b/simgear/bucket/newbucket.cxx index d948932b..fb9a62a1 100644 --- a/simgear/bucket/newbucket.cxx +++ b/simgear/bucket/newbucket.cxx @@ -408,7 +408,7 @@ void sgBucketDiff( const SGBucket& b1, const SGBucket& b2, int *dx, int *dy ) { void sgGetBuckets( const SGGeod& min, const SGGeod& max, std::vector& list ) { double lon, lat, span; - for (lat = min.getLatitudeDeg(); lat <= max.getLatitudeDeg(); lat += SG_BUCKET_SPAN) { + for (lat = min.getLatitudeDeg(); lat < max.getLatitudeDeg()+SG_BUCKET_SPAN; lat += SG_BUCKET_SPAN) { span = sg_bucket_span( lat ); for (lon = min.getLongitudeDeg(); lon <= max.getLongitudeDeg(); lon += span) {