Ignore:
Timestamp:
2009-07-03T22:19:22+02:00 (14 years ago)
Author:
stoecker
Message:

some more changes and bug fixes related to new projection stuff - GPX should now work also

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  
    3030        return new EastNorth(this.x + proportion * (en2.x - this.x),
    3131            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);
    3236    }
    3337
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r1722 r1724  
    143143    }
    144144
     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
    145154    @Override public String toString() {
    146155        return "LatLon[lat="+lat()+",lon="+lon()+"]";
Note: See TracChangeset for help on using the changeset viewer.