Changeset 1724 in josm for trunk/src/org/openstreetmap/josm/data/coor
- Timestamp:
- 2009-07-03T22:19:22+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/coor
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java
r1209 r1724 30 30 return new EastNorth(this.x + proportion * (en2.x - this.x), 31 31 this.y + proportion * (en2.y - this.y)); 32 } 33 34 public EastNorth getCenter(EastNorth en2) { 35 return new EastNorth((this.x + en2.x)/2.0, (this.y + en2.y)/2.0); 32 36 } 33 37 -
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r1722 r1724 143 143 } 144 144 145 public LatLon interpolate(LatLon ll2, double proportion) { 146 return new LatLon(this.x + proportion * (ll2.x - this.x), 147 this.y + proportion * (ll2.y - this.y)); 148 } 149 150 public LatLon getCenter(LatLon ll2) { 151 return new LatLon((this.x + ll2.x)/2.0, (this.y + ll2.y)/2.0); 152 } 153 145 154 @Override public String toString() { 146 155 return "LatLon[lat="+lat()+",lon="+lon()+"]";
Note: See TracChangeset
for help on using the changeset viewer.