Maxislav / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

BoundingBoxE6 contains method has unexpected behaivour #533

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

The method looks like this:

public boolean contains(final int aLatitudeE6, final int aLongitudeE6) {
       return ((aLatitudeE6 < this.mLatNorthE6) && (aLatitudeE6 > this.mLatSouthE6))
             || ((aLongitudeE6 < this.mLonEastE6) && (aLongitudeE6 > this.mLonWestE6));
        }

Is there a reason it checks whether the the point is within the north and south 
bound or est and west bounds, rather than within the north and south bounds and 
within the east and west bounds?  

I expected it to check if the given point was within the box, the way it is 
written now, it doesn't

Original issue reported on code.google.com by anna.gir...@gmail.com on 4 Apr 2014 at 8:36

GoogleCodeExporter commented 9 years ago
nvm I was looking at an old version of the class

Original comment by anna.gir...@gmail.com on 4 Apr 2014 at 8:55

GoogleCodeExporter commented 9 years ago

Original comment by kurtzm...@gmail.com on 4 Apr 2014 at 2:40