Index: /trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java	(revision 10914)
+++ /trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java	(revision 10915)
@@ -82,6 +82,7 @@
      */
     public EastNorth interpolate(EastNorth en2, double proportion) {
-        return new EastNorth(this.x + proportion * (en2.x - this.x),
-                this.y + proportion * (en2.y - this.y));
+        // this is an alternate form of this.x + proportion * (en2.x - this.x) that is slightly faster
+        return new EastNorth((1 - proportion) * this.x + proportion * en2.x,
+                (1 - proportion) * this.y + proportion * en2.y);
     }
 
@@ -92,5 +93,6 @@
      */
     public EastNorth getCenter(EastNorth en2) {
-        return new EastNorth((this.x + en2.x)/2.0, (this.y + en2.y)/2.0);
+        // The JIT will inline this for us, it is as fast as the normal /2 approach
+        return interpolate(en2, .5);
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 10914)
+++ /trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 10915)
@@ -427,6 +427,7 @@
      */
     public LatLon interpolate(LatLon ll2, double proportion) {
-        return new LatLon(this.lat() + proportion * (ll2.lat() - this.lat()),
-                this.lon() + proportion * (ll2.lon() - this.lon()));
+        // this is an alternate form of this.lat() + proportion * (ll2.lat() - this.lat()) that is slightly faster
+        return new LatLon((1 - proportion) * this.lat() + proportion * ll2.lat(),
+                (1 - proportion) * this.lon() + proportion * ll2.lon());
     }
 
@@ -437,4 +438,5 @@
      */
     public LatLon getCenter(LatLon ll2) {
+        // The JIT will inline this for us, it is as fast as the normal /2 approach
         return interpolate(ll2, .5);
     }
Index: /trunk/test/unit/org/openstreetmap/josm/data/coor/EastNorthTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/coor/EastNorthTest.java	(revision 10915)
+++ /trunk/test/unit/org/openstreetmap/josm/data/coor/EastNorthTest.java	(revision 10915)
@@ -0,0 +1,52 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.coor;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+/**
+ * Test the {@link EastNorth} class
+ * @author Michael Zangl
+ * @since 10915
+ */
+public class EastNorthTest {
+
+    /**
+     * Test {@link EastNorth#interpolate(EastNorth, double)}
+     */
+    @Test
+    public void testInterpolate() {
+        EastNorth en1 = new EastNorth(0, 0);
+        EastNorth en2 = new EastNorth(30, 60);
+        EastNorth en3 = new EastNorth(-70, -40);
+        // east:
+        assertEquals(15, en1.interpolate(en2, 0.5).east(), 1e-10);
+        assertEquals(0, en1.interpolate(en2, 0).east(), 1e-10);
+        assertEquals(30, en1.interpolate(en2, 1).east(), 1e-10);
+        assertEquals(0, en3.interpolate(en2, .7).east(), 1e-10);
+        // north
+        assertEquals(30, en1.interpolate(en2, 0.5).north(), 1e-10);
+        assertEquals(0, en1.interpolate(en2, 0).north(), 1e-10);
+        assertEquals(60, en1.interpolate(en2, 1).north(), 1e-10);
+        assertEquals(0, en3.interpolate(en2, .4).north(), 1e-10);
+    }
+
+    /**
+     * Test {@link EastNorth#getCenter(EastNorth)}
+     */
+    @Test
+    public void testGetCenter() {
+        EastNorth en1 = new EastNorth(0, 0);
+        EastNorth en2 = new EastNorth(30, 60);
+        EastNorth en3 = new EastNorth(-70, -40);
+
+        assertEquals(15, en1.getCenter(en2).east(), 1e-10);
+        assertEquals(15, en2.getCenter(en1).east(), 1e-10);
+        assertEquals(-20, en3.getCenter(en2).east(), 1e-10);
+
+        assertEquals(30, en1.getCenter(en2).north(), 1e-10);
+        assertEquals(30, en2.getCenter(en1).north(), 1e-10);
+        assertEquals(10, en3.getCenter(en2).north(), 1e-10);
+    }
+}
Index: /trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java	(revision 10914)
+++ /trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java	(revision 10915)
@@ -165,3 +165,43 @@
         assertEquals("2115070.3250722", c.lonToString(CoordinateFormat.EAST_NORTH));
     }
+
+    /**
+     * Test {@link LatLon#interpolate(LatLon, double)}
+     * @since 10915
+     */
+    @Test
+    public void testInterpolate() {
+        LatLon ll1 = new LatLon(0, 0);
+        LatLon ll2 = new LatLon(30, 60);
+        LatLon ll3 = new LatLon(-70, -40);
+        // lat:
+        assertEquals(15, ll1.interpolate(ll2, 0.5).lat(), 1e-10);
+        assertEquals(0, ll1.interpolate(ll2, 0).lat(), 1e-10);
+        assertEquals(30, ll1.interpolate(ll2, 1).lat(), 1e-10);
+        assertEquals(0, ll3.interpolate(ll2, .7).lat(), 1e-10);
+        // lon
+        assertEquals(30, ll1.interpolate(ll2, 0.5).lon(), 1e-10);
+        assertEquals(0, ll1.interpolate(ll2, 0).lon(), 1e-10);
+        assertEquals(60, ll1.interpolate(ll2, 1).lon(), 1e-10);
+        assertEquals(0, ll3.interpolate(ll2, .4).lon(), 1e-10);
+    }
+
+    /**
+     * Test {@link LatLon#getCenter(LatLon)}
+     * @since 10915
+     */
+    @Test
+    public void testGetCenter() {
+        LatLon ll1 = new LatLon(0, 0);
+        LatLon ll2 = new LatLon(30, 60);
+        LatLon ll3 = new LatLon(-70, -40);
+
+        assertEquals(15, ll1.getCenter(ll2).lat(), 1e-10);
+        assertEquals(15, ll2.getCenter(ll1).lat(), 1e-10);
+        assertEquals(-20, ll3.getCenter(ll2).lat(), 1e-10);
+
+        assertEquals(30, ll1.getCenter(ll2).lon(), 1e-10);
+        assertEquals(30, ll2.getCenter(ll1).lon(), 1e-10);
+        assertEquals(10, ll3.getCenter(ll2).lon(), 1e-10);
+    }
 }
