Changeset 14095 in josm for trunk/src/org/openstreetmap/josm/data/Bounds.java
- Timestamp:
- 2018-08-05T21:58:40+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Bounds.java
r13602 r14095 160 160 /** 161 161 * Constructs bounds out of two points. Coords will be rounded. 162 * @param min lat min lat163 * @param min lon min lon164 * @param max lat max lat165 * @param max lon max lon166 */ 167 public Bounds(double min lat, double minlon, double maxlat, double maxlon) {168 this(min lat, minlon, maxlat, maxlon, true);162 * @param minLat min lat 163 * @param minLon min lon 164 * @param maxLat max lat 165 * @param maxLon max lon 166 */ 167 public Bounds(double minLat, double minLon, double maxLat, double maxLon) { 168 this(minLat, minLon, maxLat, maxLon, true); 169 169 } 170 170 171 171 /** 172 172 * Constructs bounds out of two points. 173 * @param min lat min lat174 * @param min lon min lon175 * @param max lat max lat176 * @param max lon max lon173 * @param minLat min lat 174 * @param minLon min lon 175 * @param maxLat max lat 176 * @param maxLon max lon 177 177 * @param roundToOsmPrecision defines if lat/lon will be rounded 178 178 */ 179 public Bounds(double min lat, double minlon, double maxlat, double maxlon, boolean roundToOsmPrecision) {179 public Bounds(double minLat, double minLon, double maxLat, double maxLon, boolean roundToOsmPrecision) { 180 180 if (roundToOsmPrecision) { 181 this.minLat = LatLon.roundToOsmPrecision(min lat);182 this.minLon = LatLon.roundToOsmPrecision(min lon);183 this.maxLat = LatLon.roundToOsmPrecision(max lat);184 this.maxLon = LatLon.roundToOsmPrecision(max lon);185 } else { 186 this.minLat = min lat;187 this.minLon = min lon;188 this.maxLat = max lat;189 this.maxLon = max lon;181 this.minLat = LatLon.roundToOsmPrecision(minLat); 182 this.minLon = LatLon.roundToOsmPrecision(minLon); 183 this.maxLat = LatLon.roundToOsmPrecision(maxLat); 184 this.maxLon = LatLon.roundToOsmPrecision(maxLon); 185 } else { 186 this.minLat = minLat; 187 this.minLon = minLon; 188 this.maxLat = maxLat; 189 this.maxLon = maxLon; 190 190 } 191 191 }
Note:
See TracChangeset
for help on using the changeset viewer.