Changeset 14521 in josm for trunk/src/org/openstreetmap/josm/data/Bounds.java
- Timestamp:
- 2018-12-08T14:19:23+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Bounds.java
r14095 r14521 500 500 */ 501 501 public Rectangle2D.Double asRect() { 502 double w = getWidth(); 503 return new Rectangle2D.Double(minLon, minLat, w, maxLat-minLat); 504 } 505 506 private double getWidth() { 502 return new Rectangle2D.Double(minLon, minLat, getWidth(), getHeight()); 503 } 504 505 /** 506 * Returns the bounds width. 507 * @return the bounds width 508 * @since 14521 509 */ 510 public double getHeight() { 511 return maxLat-minLat; 512 } 513 514 /** 515 * Returns the bounds width. 516 * @return the bounds width 517 * @since 14521 518 */ 519 public double getWidth() { 507 520 return maxLon-minLon + (crosses180thMeridian() ? 360.0 : 0.0); 508 521 } … … 513 526 */ 514 527 public double getArea() { 515 return getWidth() * (maxLat - minLat);528 return getWidth() * getHeight(); 516 529 } 517 530
Note:
See TracChangeset
for help on using the changeset viewer.