Changeset 9976 in josm for trunk/src/org/openstreetmap/josm/data/osm/BBox.java
- Timestamp:
- 2016-03-13T00:38:12+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/BBox.java
r9372 r9976 153 153 */ 154 154 public boolean bounds(BBox b) { 155 if (!(xmin <= b.xmin) || 156 !(xmax >= b.xmax) || 157 !(ymin <= b.ymin) || 158 !(ymax >= b.ymax)) 159 return false; 160 return true; 155 return xmin <= b.xmin && xmax >= b.xmax 156 && ymin <= b.ymin && ymax >= b.ymax; 161 157 } 162 158 … … 167 163 */ 168 164 public boolean bounds(LatLon c) { 169 if ((xmin <= c.lon()) && 170 (xmax >= c.lon()) && 171 (ymin <= c.lat()) && 172 (ymax >= c.lat())) 173 return true; 174 return false; 165 return xmin <= c.lon() && xmax >= c.lon() 166 && ymin <= c.lat() && ymax >= c.lat(); 175 167 } 176 168
Note:
See TracChangeset
for help on using the changeset viewer.