Changeset 6173 in josm for trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java
- Timestamp:
- 2013-08-22T00:33:32+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java
r6169 r6173 9 9 * @author Imi 10 10 */ 11 public class EastNorth extends Coordinate implements Cloneable{11 public class EastNorth extends Coordinate { 12 12 13 13 public EastNorth(double east, double north) { … … 37 37 public EastNorth interpolate(EastNorth en2, double proportion) { 38 38 return new EastNorth(this.x + proportion * (en2.x - this.x), 39 this.y + proportion * (en2.y - this.y));39 this.y + proportion * (en2.y - this.y)); 40 40 } 41 41 … … 54 54 return super.distance(en); 55 55 } 56 56 57 57 /** 58 58 * Returns the square of the euclidean distance from this {@code EastNorth} to a specified {@code EastNorth}. … … 74 74 return Math.sqrt(x*x + y*y); 75 75 } 76 76 77 77 /** 78 78 * Returns the heading, in radians, that you have to use to get from … … 84 84 public double heading(EastNorth other) { 85 85 double hd = Math.atan2(other.east() - east(), other.north() - north()); 86 if(hd < 0) hd = 2 * Math.PI + hd; 86 if(hd < 0) { 87 hd = 2 * Math.PI + hd; 88 } 87 89 return hd; 88 90 } … … 130 132 return (Math.abs(x - other.x) < e && Math.abs(y - other.y) < e); 131 133 } 132 133 @Override134 public EastNorth clone() throws CloneNotSupportedException {135 return (EastNorth) super.clone();136 }137 134 }
Note:
See TracChangeset
for help on using the changeset viewer.