Changeset 9243 in josm for trunk/src/org/openstreetmap/josm/data/ProjectionBounds.java
- Timestamp:
- 2016-01-01T19:51:11+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/ProjectionBounds.java
r8927 r9243 13 13 public class ProjectionBounds { 14 14 /** 15 * The minimum and maximum coordinates.15 * The minimum east coordinate. 16 16 */ 17 public double minEast, minNorth, maxEast, maxNorth; 17 public double minEast; 18 /** 19 * The minimum north coordinate. 20 */ 21 public double minNorth; 22 /** 23 * The maximum east coordinate. 24 */ 25 public double maxEast; 26 /** 27 * The minimum north coordinate. 28 */ 29 public double maxNorth; 18 30 19 31 /** 20 32 * Construct bounds out of two points. 33 * @param min min east/north 34 * @param max max east/north 21 35 */ 22 36 public ProjectionBounds(EastNorth min, EastNorth max) { … … 27 41 } 28 42 43 /** 44 * Construct bounds out of a single point. 45 * @param p east/north 46 */ 29 47 public ProjectionBounds(EastNorth p) { 30 48 this.minEast = this.maxEast = p.east(); … … 32 50 } 33 51 52 /** 53 * Construct bounds out of a center point and east/north dimensions. 54 * @param center center east/north 55 * @param east east dimension 56 * @param north north dimension 57 */ 34 58 public ProjectionBounds(EastNorth center, double east, double north) { 35 59 this.minEast = center.east()-east/2.0; … … 39 63 } 40 64 65 /** 66 * Construct bounds out of two points. 67 * @param minEast min east 68 * @param minNorth min north 69 * @param maxEast max east 70 * @param maxNorth max north 71 */ 41 72 public ProjectionBounds(double minEast, double minNorth, double maxEast, double maxNorth) { 42 73 this.minEast = minEast; … … 46 77 } 47 78 79 /** 80 * Extends bounds to include point {@code e}. 81 * @param e east/north to include 82 */ 48 83 public void extend(EastNorth e) { 49 84 if (e.east() < minEast) { … … 61 96 } 62 97 98 /** 99 * Returns the center east/north. 100 * @return the center east/north 101 */ 63 102 public EastNorth getCenter() { 64 103 return new EastNorth((minEast + maxEast) / 2.0, (minNorth + maxNorth) / 2.0); … … 73 112 * The two bounds intersect? Compared to java Shape.intersects, if does not use 74 113 * the interior but the closure. (">=" instead of ">") 114 * @param b projection bounds 115 * @return {@code true} if the two bounds intersect 75 116 */ 76 117 public boolean intersects(ProjectionBounds b) { … … 81 122 } 82 123 124 /** 125 * Returns the min east/north. 126 * @return the min east/north 127 */ 83 128 public EastNorth getMin() { 84 129 return new EastNorth(minEast, minNorth); 85 130 } 86 131 132 /** 133 * Returns the max east/north. 134 * @return the max east/north 135 */ 87 136 public EastNorth getMax() { 88 137 return new EastNorth(maxEast, maxNorth);
Note:
See TracChangeset
for help on using the changeset viewer.