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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.