commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raydeca...@apache.org
Subject [04/11] [math] MATH-1284: Vector no longer extends Point. Replace/rename Vector?D classes with Coordinate?D classes which implement both Vector and Point. When there are multiple implementations of the same method which would confuse the compiler, prefer
Date Tue, 25 Apr 2017 22:57:00 GMT
http://git-wip-us.apache.org/repos/asf/commons-math/blob/b815d2af/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/Vector3DTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/Vector3DTest.java
b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/Vector3DTest.java
index dbf1b3e..296ade8 100644
--- a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/Vector3DTest.java
+++ b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/Vector3DTest.java
@@ -27,7 +27,7 @@ import org.apache.commons.math4.exception.DimensionMismatchException;
 import org.apache.commons.math4.exception.MathArithmeticException;
 import org.apache.commons.math4.geometry.Space;
 import org.apache.commons.math4.geometry.euclidean.threed.Rotation;
-import org.apache.commons.math4.geometry.euclidean.threed.Vector3D;
+import org.apache.commons.math4.geometry.euclidean.threed.Coordinates3D;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.simple.RandomSource;
 import org.apache.commons.math4.util.FastMath;
@@ -39,27 +39,27 @@ public class Vector3DTest {
     @Test
     public void testConstructors() throws DimensionMismatchException {
         double r = FastMath.sqrt(2) /2;
-        checkVector(new Vector3D(2, new Vector3D(FastMath.PI / 3, -FastMath.PI / 4)),
+        checkVector(new Coordinates3D(2, new Coordinates3D(FastMath.PI / 3, -FastMath.PI
/ 4)),
                     r, r * FastMath.sqrt(3), -2 * r);
-        checkVector(new Vector3D(2, Vector3D.PLUS_I,
-                                 -3, Vector3D.MINUS_K),
+        checkVector(new Coordinates3D(2, Coordinates3D.PLUS_I,
+                                 -3, Coordinates3D.MINUS_K),
                     2, 0, 3);
-        checkVector(new Vector3D(2, Vector3D.PLUS_I,
-                                 5, Vector3D.PLUS_J,
-                                 -3, Vector3D.MINUS_K),
+        checkVector(new Coordinates3D(2, Coordinates3D.PLUS_I,
+                                 5, Coordinates3D.PLUS_J,
+                                 -3, Coordinates3D.MINUS_K),
                     2, 5, 3);
-        checkVector(new Vector3D(2, Vector3D.PLUS_I,
-                                 5, Vector3D.PLUS_J,
-                                 5, Vector3D.MINUS_J,
-                                 -3, Vector3D.MINUS_K),
+        checkVector(new Coordinates3D(2, Coordinates3D.PLUS_I,
+                                 5, Coordinates3D.PLUS_J,
+                                 5, Coordinates3D.MINUS_J,
+                                 -3, Coordinates3D.MINUS_K),
                     2, 0, 3);
-        checkVector(new Vector3D(new double[] { 2,  5,  -3 }),
+        checkVector(new Coordinates3D(new double[] { 2,  5,  -3 }),
                     2, 5, -3);
     }
 
     @Test
     public void testSpace() {
-        Space space = new Vector3D(1, 2, 2).getSpace();
+        Space space = new Coordinates3D(1, 2, 2).getSpace();
         Assert.assertEquals(3, space.getDimension());
         Assert.assertEquals(2, space.getSubSpace().getDimension());
         Space deserialized = (Space) TestUtils.serializeAndRecover(space);
@@ -68,63 +68,63 @@ public class Vector3DTest {
 
     @Test
     public void testZero() {
-        Assert.assertEquals(0, new Vector3D(1, 2, 2).getZero().getNorm(), 1.0e-15);
+        Assert.assertEquals(0, new Coordinates3D(1, 2, 2).getZero().getNorm(), 1.0e-15);
     }
 
     @Test
     public void testEquals() {
-        Vector3D u1 = new Vector3D(1, 2, 3);
-        Vector3D u2 = new Vector3D(1, 2, 3);
+        Coordinates3D u1 = new Coordinates3D(1, 2, 3);
+        Coordinates3D u2 = new Coordinates3D(1, 2, 3);
         Assert.assertTrue(u1.equals(u1));
         Assert.assertTrue(u1.equals(u2));
         Assert.assertFalse(u1.equals(new Rotation(1, 0, 0, 0, false)));
-        Assert.assertFalse(u1.equals(new Vector3D(1, 2, 3 + 10 * Precision.EPSILON)));
-        Assert.assertFalse(u1.equals(new Vector3D(1, 2 + 10 * Precision.EPSILON, 3)));
-        Assert.assertFalse(u1.equals(new Vector3D(1 + 10 * Precision.EPSILON, 2, 3)));
-        Assert.assertTrue(new Vector3D(0, Double.NaN, 0).equals(new Vector3D(0, 0, Double.NaN)));
+        Assert.assertFalse(u1.equals(new Coordinates3D(1, 2, 3 + 10 * Precision.EPSILON)));
+        Assert.assertFalse(u1.equals(new Coordinates3D(1, 2 + 10 * Precision.EPSILON, 3)));
+        Assert.assertFalse(u1.equals(new Coordinates3D(1 + 10 * Precision.EPSILON, 2, 3)));
+        Assert.assertTrue(new Coordinates3D(0, Double.NaN, 0).equals(new Coordinates3D(0,
0, Double.NaN)));
     }
 
     @Test
     public void testHash() {
-        Assert.assertEquals(new Vector3D(0, Double.NaN, 0).hashCode(), new Vector3D(0, 0,
Double.NaN).hashCode());
-        Vector3D u = new Vector3D(1, 2, 3);
-        Vector3D v = new Vector3D(1, 2, 3 + 10 * Precision.EPSILON);
+        Assert.assertEquals(new Coordinates3D(0, Double.NaN, 0).hashCode(), new Coordinates3D(0,
0, Double.NaN).hashCode());
+        Coordinates3D u = new Coordinates3D(1, 2, 3);
+        Coordinates3D v = new Coordinates3D(1, 2, 3 + 10 * Precision.EPSILON);
         Assert.assertTrue(u.hashCode() != v.hashCode());
     }
 
     @Test
     public void testInfinite() {
-        Assert.assertTrue(new Vector3D(1, 1, Double.NEGATIVE_INFINITY).isInfinite());
-        Assert.assertTrue(new Vector3D(1, Double.NEGATIVE_INFINITY, 1).isInfinite());
-        Assert.assertTrue(new Vector3D(Double.NEGATIVE_INFINITY, 1, 1).isInfinite());
-        Assert.assertFalse(new Vector3D(1, 1, 2).isInfinite());
-        Assert.assertFalse(new Vector3D(1, Double.NaN, Double.NEGATIVE_INFINITY).isInfinite());
+        Assert.assertTrue(new Coordinates3D(1, 1, Double.NEGATIVE_INFINITY).isInfinite());
+        Assert.assertTrue(new Coordinates3D(1, Double.NEGATIVE_INFINITY, 1).isInfinite());
+        Assert.assertTrue(new Coordinates3D(Double.NEGATIVE_INFINITY, 1, 1).isInfinite());
+        Assert.assertFalse(new Coordinates3D(1, 1, 2).isInfinite());
+        Assert.assertFalse(new Coordinates3D(1, Double.NaN, Double.NEGATIVE_INFINITY).isInfinite());
     }
 
     @Test
     public void testNaN() {
-        Assert.assertTrue(new Vector3D(1, 1, Double.NaN).isNaN());
-        Assert.assertTrue(new Vector3D(1, Double.NaN, 1).isNaN());
-        Assert.assertTrue(new Vector3D(Double.NaN, 1, 1).isNaN());
-        Assert.assertFalse(new Vector3D(1, 1, 2).isNaN());
-        Assert.assertFalse(new Vector3D(1, 1, Double.NEGATIVE_INFINITY).isNaN());
+        Assert.assertTrue(new Coordinates3D(1, 1, Double.NaN).isNaN());
+        Assert.assertTrue(new Coordinates3D(1, Double.NaN, 1).isNaN());
+        Assert.assertTrue(new Coordinates3D(Double.NaN, 1, 1).isNaN());
+        Assert.assertFalse(new Coordinates3D(1, 1, 2).isNaN());
+        Assert.assertFalse(new Coordinates3D(1, 1, Double.NEGATIVE_INFINITY).isNaN());
     }
 
     @Test
     public void testToString() {
-        Assert.assertEquals("{3; 2; 1}", new Vector3D(3, 2, 1).toString());
+        Assert.assertEquals("{3; 2; 1}", new Coordinates3D(3, 2, 1).toString());
         NumberFormat format = new DecimalFormat("0.000", new DecimalFormatSymbols(Locale.US));
-        Assert.assertEquals("{3.000; 2.000; 1.000}", new Vector3D(3, 2, 1).toString(format));
+        Assert.assertEquals("{3.000; 2.000; 1.000}", new Coordinates3D(3, 2, 1).toString(format));
     }
 
     @Test(expected=DimensionMismatchException.class)
     public void testWrongDimension() throws DimensionMismatchException {
-        new Vector3D(new double[] { 2,  5 });
+        new Coordinates3D(new double[] { 2,  5 });
     }
 
     @Test
     public void testCoordinates() {
-        Vector3D v = new Vector3D(1, 2, 3);
+        Coordinates3D v = new Coordinates3D(1, 2, 3);
         Assert.assertTrue(FastMath.abs(v.getX() - 1) < 1.0e-12);
         Assert.assertTrue(FastMath.abs(v.getY() - 2) < 1.0e-12);
         Assert.assertTrue(FastMath.abs(v.getZ() - 3) < 1.0e-12);
@@ -136,69 +136,69 @@ public class Vector3DTest {
 
     @Test
     public void testNorm1() {
-        Assert.assertEquals(0.0, Vector3D.ZERO.getNorm1(), 0);
-        Assert.assertEquals(6.0, new Vector3D(1, -2, 3).getNorm1(), 0);
+        Assert.assertEquals(0.0, Coordinates3D.ZERO.getNorm1(), 0);
+        Assert.assertEquals(6.0, new Coordinates3D(1, -2, 3).getNorm1(), 0);
     }
 
     @Test
     public void testNorm() {
-        Assert.assertEquals(0.0, Vector3D.ZERO.getNorm(), 0);
-        Assert.assertEquals(FastMath.sqrt(14), new Vector3D(1, 2, 3).getNorm(), 1.0e-12);
+        Assert.assertEquals(0.0, Coordinates3D.ZERO.getNorm(), 0);
+        Assert.assertEquals(FastMath.sqrt(14), new Coordinates3D(1, 2, 3).getNorm(), 1.0e-12);
     }
 
     @Test
     public void testNormSq() {
-        Assert.assertEquals(0.0, new Vector3D(0, 0, 0).getNormSq(), 0);
-        Assert.assertEquals(14, new Vector3D(1, 2, 3).getNormSq(), 1.0e-12);
+        Assert.assertEquals(0.0, new Coordinates3D(0, 0, 0).getNormSq(), 0);
+        Assert.assertEquals(14, new Coordinates3D(1, 2, 3).getNormSq(), 1.0e-12);
     }
 
     @Test
     public void testNormInf() {
-        Assert.assertEquals(0.0, Vector3D.ZERO.getNormInf(), 0);
-        Assert.assertEquals(3.0, new Vector3D(1, -2, 3).getNormInf(), 0);
+        Assert.assertEquals(0.0, Coordinates3D.ZERO.getNormInf(), 0);
+        Assert.assertEquals(3.0, new Coordinates3D(1, -2, 3).getNormInf(), 0);
     }
 
     @Test
     public void testDistance1() {
-        Vector3D v1 = new Vector3D(1, -2, 3);
-        Vector3D v2 = new Vector3D(-4, 2, 0);
-        Assert.assertEquals(0.0, Vector3D.distance1(Vector3D.MINUS_I, Vector3D.MINUS_I),
0);
-        Assert.assertEquals(12.0, Vector3D.distance1(v1, v2), 1.0e-12);
-        Assert.assertEquals(v1.subtract(v2).getNorm1(), Vector3D.distance1(v1, v2), 1.0e-12);
+        Coordinates3D v1 = new Coordinates3D(1, -2, 3);
+        Coordinates3D v2 = new Coordinates3D(-4, 2, 0);
+        Assert.assertEquals(0.0, Coordinates3D.distance1(Coordinates3D.MINUS_I, Coordinates3D.MINUS_I),
0);
+        Assert.assertEquals(12.0, Coordinates3D.distance1(v1, v2), 1.0e-12);
+        Assert.assertEquals(v1.subtract(v2).getNorm1(), Coordinates3D.distance1(v1, v2),
1.0e-12);
     }
 
     @Test
     public void testDistance() {
-        Vector3D v1 = new Vector3D(1, -2, 3);
-        Vector3D v2 = new Vector3D(-4, 2, 0);
-        Assert.assertEquals(0.0, Vector3D.distance(Vector3D.MINUS_I, Vector3D.MINUS_I), 0);
-        Assert.assertEquals(FastMath.sqrt(50), Vector3D.distance(v1, v2), 1.0e-12);
-        Assert.assertEquals(v1.subtract(v2).getNorm(), Vector3D.distance(v1, v2), 1.0e-12);
+        Coordinates3D v1 = new Coordinates3D(1, -2, 3);
+        Coordinates3D v2 = new Coordinates3D(-4, 2, 0);
+        Assert.assertEquals(0.0, Coordinates3D.distance(Coordinates3D.MINUS_I, Coordinates3D.MINUS_I),
0);
+        Assert.assertEquals(FastMath.sqrt(50), Coordinates3D.distance(v1, v2), 1.0e-12);
+        Assert.assertEquals(v1.subtract(v2).getNorm(), Coordinates3D.distance(v1, v2), 1.0e-12);
     }
 
     @Test
     public void testDistanceSq() {
-        Vector3D v1 = new Vector3D(1, -2, 3);
-        Vector3D v2 = new Vector3D(-4, 2, 0);
-        Assert.assertEquals(0.0, Vector3D.distanceSq(Vector3D.MINUS_I, Vector3D.MINUS_I),
0);
-        Assert.assertEquals(50.0, Vector3D.distanceSq(v1, v2), 1.0e-12);
-        Assert.assertEquals(Vector3D.distance(v1, v2) * Vector3D.distance(v1, v2),
-                            Vector3D.distanceSq(v1, v2), 1.0e-12);
+        Coordinates3D v1 = new Coordinates3D(1, -2, 3);
+        Coordinates3D v2 = new Coordinates3D(-4, 2, 0);
+        Assert.assertEquals(0.0, Coordinates3D.distanceSq(Coordinates3D.MINUS_I, Coordinates3D.MINUS_I),
0);
+        Assert.assertEquals(50.0, Coordinates3D.distanceSq(v1, v2), 1.0e-12);
+        Assert.assertEquals(Coordinates3D.distance(v1, v2) * Coordinates3D.distance(v1, v2),
+                            Coordinates3D.distanceSq(v1, v2), 1.0e-12);
   }
 
     @Test
     public void testDistanceInf() {
-        Vector3D v1 = new Vector3D(1, -2, 3);
-        Vector3D v2 = new Vector3D(-4, 2, 0);
-        Assert.assertEquals(0.0, Vector3D.distanceInf(Vector3D.MINUS_I, Vector3D.MINUS_I),
0);
-        Assert.assertEquals(5.0, Vector3D.distanceInf(v1, v2), 1.0e-12);
-        Assert.assertEquals(v1.subtract(v2).getNormInf(), Vector3D.distanceInf(v1, v2), 1.0e-12);
+        Coordinates3D v1 = new Coordinates3D(1, -2, 3);
+        Coordinates3D v2 = new Coordinates3D(-4, 2, 0);
+        Assert.assertEquals(0.0, Coordinates3D.distanceInf(Coordinates3D.MINUS_I, Coordinates3D.MINUS_I),
0);
+        Assert.assertEquals(5.0, Coordinates3D.distanceInf(v1, v2), 1.0e-12);
+        Assert.assertEquals(v1.subtract(v2).getNormInf(), Coordinates3D.distanceInf(v1, v2),
1.0e-12);
     }
 
     @Test
     public void testSubtract() {
-        Vector3D v1 = new Vector3D(1, 2, 3);
-        Vector3D v2 = new Vector3D(-3, -2, -1);
+        Coordinates3D v1 = new Coordinates3D(1, 2, 3);
+        Coordinates3D v2 = new Coordinates3D(-3, -2, -1);
         v1 = v1.subtract(v2);
         checkVector(v1, 4, 4, 4);
 
@@ -208,8 +208,8 @@ public class Vector3DTest {
 
     @Test
     public void testAdd() {
-        Vector3D v1 = new Vector3D(1, 2, 3);
-        Vector3D v2 = new Vector3D(-3, -2, -1);
+        Coordinates3D v1 = new Coordinates3D(1, 2, 3);
+        Coordinates3D v2 = new Coordinates3D(-3, -2, -1);
         v1 = v1.add(v2);
         checkVector(v1, -2, 0, 2);
 
@@ -219,7 +219,7 @@ public class Vector3DTest {
 
     @Test
     public void testScalarProduct() {
-        Vector3D v = new Vector3D(1, 2, 3);
+        Coordinates3D v = new Coordinates3D(1, 2, 3);
         v = v.scalarMultiply(3);
         checkVector(v, 3, 6, 9);
 
@@ -228,61 +228,61 @@ public class Vector3DTest {
 
     @Test
     public void testVectorialProducts() {
-        Vector3D v1 = new Vector3D(2, 1, -4);
-        Vector3D v2 = new Vector3D(3, 1, -1);
+        Coordinates3D v1 = new Coordinates3D(2, 1, -4);
+        Coordinates3D v2 = new Coordinates3D(3, 1, -1);
 
-        Assert.assertTrue(FastMath.abs(Vector3D.dotProduct(v1, v2) - 11) < 1.0e-12);
+        Assert.assertTrue(FastMath.abs(Coordinates3D.dotProduct(v1, v2) - 11) < 1.0e-12);
 
-        Vector3D v3 = Vector3D.crossProduct(v1, v2);
+        Coordinates3D v3 = Coordinates3D.crossProduct(v1, v2);
         checkVector(v3, 3, -10, -1);
 
-        Assert.assertTrue(FastMath.abs(Vector3D.dotProduct(v1, v3)) < 1.0e-12);
-        Assert.assertTrue(FastMath.abs(Vector3D.dotProduct(v2, v3)) < 1.0e-12);
+        Assert.assertTrue(FastMath.abs(Coordinates3D.dotProduct(v1, v3)) < 1.0e-12);
+        Assert.assertTrue(FastMath.abs(Coordinates3D.dotProduct(v2, v3)) < 1.0e-12);
     }
 
     @Test
     public void testCrossProductCancellation() {
-        Vector3D v1 = new Vector3D(9070467121.0, 4535233560.0, 1);
-        Vector3D v2 = new Vector3D(9070467123.0, 4535233561.0, 1);
-        checkVector(Vector3D.crossProduct(v1, v2), -1, 2, 1);
+        Coordinates3D v1 = new Coordinates3D(9070467121.0, 4535233560.0, 1);
+        Coordinates3D v2 = new Coordinates3D(9070467123.0, 4535233561.0, 1);
+        checkVector(Coordinates3D.crossProduct(v1, v2), -1, 2, 1);
 
         double scale    = FastMath.scalb(1.0, 100);
-        Vector3D big1   = new Vector3D(scale, v1);
-        Vector3D small2 = new Vector3D(1 / scale, v2);
-        checkVector(Vector3D.crossProduct(big1, small2), -1, 2, 1);
+        Coordinates3D big1   = new Coordinates3D(scale, v1);
+        Coordinates3D small2 = new Coordinates3D(1 / scale, v2);
+        checkVector(Coordinates3D.crossProduct(big1, small2), -1, 2, 1);
 
     }
 
     @Test
     public void testAngular() {
-        Assert.assertEquals(0,           Vector3D.PLUS_I.getAlpha(), 1.0e-10);
-        Assert.assertEquals(0,           Vector3D.PLUS_I.getDelta(), 1.0e-10);
-        Assert.assertEquals(FastMath.PI / 2, Vector3D.PLUS_J.getAlpha(), 1.0e-10);
-        Assert.assertEquals(0,           Vector3D.PLUS_J.getDelta(), 1.0e-10);
-        Assert.assertEquals(0,           Vector3D.PLUS_K.getAlpha(), 1.0e-10);
-        Assert.assertEquals(FastMath.PI / 2, Vector3D.PLUS_K.getDelta(), 1.0e-10);
-
-        Vector3D u = new Vector3D(-1, 1, -1);
+        Assert.assertEquals(0,           Coordinates3D.PLUS_I.getAlpha(), 1.0e-10);
+        Assert.assertEquals(0,           Coordinates3D.PLUS_I.getDelta(), 1.0e-10);
+        Assert.assertEquals(FastMath.PI / 2, Coordinates3D.PLUS_J.getAlpha(), 1.0e-10);
+        Assert.assertEquals(0,           Coordinates3D.PLUS_J.getDelta(), 1.0e-10);
+        Assert.assertEquals(0,           Coordinates3D.PLUS_K.getAlpha(), 1.0e-10);
+        Assert.assertEquals(FastMath.PI / 2, Coordinates3D.PLUS_K.getDelta(), 1.0e-10);
+
+        Coordinates3D u = new Coordinates3D(-1, 1, -1);
         Assert.assertEquals(3 * FastMath.PI /4, u.getAlpha(), 1.0e-10);
         Assert.assertEquals(-1.0 / FastMath.sqrt(3), FastMath.sin(u.getDelta()), 1.0e-10);
     }
 
     @Test
     public void testAngularSeparation() throws MathArithmeticException {
-        Vector3D v1 = new Vector3D(2, -1, 4);
+        Coordinates3D v1 = new Coordinates3D(2, -1, 4);
 
-        Vector3D  k = v1.normalize();
-        Vector3D  i = k.orthogonal();
-        Vector3D v2 = k.scalarMultiply(FastMath.cos(1.2)).add(i.scalarMultiply(FastMath.sin(1.2)));
+        Coordinates3D  k = v1.normalize();
+        Coordinates3D  i = k.orthogonal();
+        Coordinates3D v2 = k.scalarMultiply(FastMath.cos(1.2)).add(i.scalarMultiply(FastMath.sin(1.2)));
 
-        Assert.assertTrue(FastMath.abs(Vector3D.angle(v1, v2) - 1.2) < 1.0e-12);
+        Assert.assertTrue(FastMath.abs(Coordinates3D.angle(v1, v2) - 1.2) < 1.0e-12);
   }
 
     @Test
     public void testNormalize() throws MathArithmeticException {
-        Assert.assertEquals(1.0, new Vector3D(5, -4, 2).normalize().getNorm(), 1.0e-12);
+        Assert.assertEquals(1.0, new Coordinates3D(5, -4, 2).normalize().getNorm(), 1.0e-12);
         try {
-            Vector3D.ZERO.normalize();
+            Coordinates3D.ZERO.normalize();
             Assert.fail("an exception should have been thrown");
         } catch (MathArithmeticException ae) {
             // expected behavior
@@ -291,21 +291,21 @@ public class Vector3DTest {
 
     @Test
     public void testNegate() {
-        checkVector(new Vector3D(0.1, 2.5, 1.3).negate(), -0.1, -2.5, -1.3);
+        checkVector(new Coordinates3D(0.1, 2.5, 1.3).negate(), -0.1, -2.5, -1.3);
     }
 
     @Test
     public void testOrthogonal() throws MathArithmeticException {
-        Vector3D v1 = new Vector3D(0.1, 2.5, 1.3);
-        Assert.assertEquals(0.0, Vector3D.dotProduct(v1, v1.orthogonal()), 1.0e-12);
-        Vector3D v2 = new Vector3D(2.3, -0.003, 7.6);
-        Assert.assertEquals(0.0, Vector3D.dotProduct(v2, v2.orthogonal()), 1.0e-12);
-        Vector3D v3 = new Vector3D(-1.7, 1.4, 0.2);
-        Assert.assertEquals(0.0, Vector3D.dotProduct(v3, v3.orthogonal()), 1.0e-12);
-        Vector3D v4 = new Vector3D(4.2, 0.1, -1.8);
-        Assert.assertEquals(0.0, Vector3D.dotProduct(v4, v4.orthogonal()), 1.0e-12);
+        Coordinates3D v1 = new Coordinates3D(0.1, 2.5, 1.3);
+        Assert.assertEquals(0.0, Coordinates3D.dotProduct(v1, v1.orthogonal()), 1.0e-12);
+        Coordinates3D v2 = new Coordinates3D(2.3, -0.003, 7.6);
+        Assert.assertEquals(0.0, Coordinates3D.dotProduct(v2, v2.orthogonal()), 1.0e-12);
+        Coordinates3D v3 = new Coordinates3D(-1.7, 1.4, 0.2);
+        Assert.assertEquals(0.0, Coordinates3D.dotProduct(v3, v3.orthogonal()), 1.0e-12);
+        Coordinates3D v4 = new Coordinates3D(4.2, 0.1, -1.8);
+        Assert.assertEquals(0.0, Coordinates3D.dotProduct(v4, v4.orthogonal()), 1.0e-12);
         try {
-            new Vector3D(0, 0, 0).orthogonal();
+            new Coordinates3D(0, 0, 0).orthogonal();
             Assert.fail("an exception should have been thrown");
         } catch (MathArithmeticException ae) {
             // expected behavior
@@ -314,16 +314,16 @@ public class Vector3DTest {
     @Test
     public void testAngle() throws MathArithmeticException {
         Assert.assertEquals(0.22572612855273393616,
-                            Vector3D.angle(new Vector3D(1, 2, 3), new Vector3D(4, 5, 6)),
+                            Coordinates3D.angle(new Coordinates3D(1, 2, 3), new Coordinates3D(4,
5, 6)),
                             1.0e-12);
         Assert.assertEquals(7.98595620686106654517199e-8,
-                            Vector3D.angle(new Vector3D(1, 2, 3), new Vector3D(2, 4, 6.000001)),
+                            Coordinates3D.angle(new Coordinates3D(1, 2, 3), new Coordinates3D(2,
4, 6.000001)),
                             1.0e-12);
         Assert.assertEquals(3.14159257373023116985197793156,
-                            Vector3D.angle(new Vector3D(1, 2, 3), new Vector3D(-2, -4, -6.000001)),
+                            Coordinates3D.angle(new Coordinates3D(1, 2, 3), new Coordinates3D(-2,
-4, -6.000001)),
                             1.0e-12);
         try {
-            Vector3D.angle(Vector3D.ZERO, Vector3D.PLUS_I);
+            Coordinates3D.angle(Coordinates3D.ZERO, Coordinates3D.PLUS_I);
             Assert.fail("an exception should have been thrown");
         } catch (MathArithmeticException ae) {
             // expected behavior
@@ -335,10 +335,10 @@ public class Vector3DTest {
         // the following two vectors are nearly but not exactly orthogonal
         // naive dot product (i.e. computing u1.x * u2.x + u1.y * u2.y + u1.z * u2.z
         // leads to a result of 0.0, instead of the correct -1.855129...
-        Vector3D u1 = new Vector3D(-1321008684645961.0 /  268435456.0,
+        Coordinates3D u1 = new Coordinates3D(-1321008684645961.0 /  268435456.0,
                                    -5774608829631843.0 /  268435456.0,
                                    -7645843051051357.0 / 8589934592.0);
-        Vector3D u2 = new Vector3D(-5712344449280879.0 /    2097152.0,
+        Coordinates3D u2 = new Coordinates3D(-5712344449280879.0 /    2097152.0,
                                    -4550117129121957.0 /    2097152.0,
                                     8846951984510141.0 /     131072.0);
         double sNaive = u1.getX() * u2.getX() + u1.getY() * u2.getY() + u1.getZ() * u2.getZ();
@@ -360,7 +360,7 @@ public class Vector3DTest {
             double vy = 10000 * random.nextDouble();
             double vz = 10000 * random.nextDouble();
             double sNaive = ux * vx + uy * vy + uz * vz;
-            double sAccurate = new Vector3D(ux, uy, uz).dotProduct(new Vector3D(vx, vy, vz));
+            double sAccurate = new Coordinates3D(ux, uy, uz).dotProduct(new Coordinates3D(vx,
vy, vz));
             Assert.assertEquals(sNaive, sAccurate, 2.5e-16 * sAccurate);
         }
     }
@@ -372,19 +372,19 @@ public class Vector3DTest {
         // computing u1.x * u2.x + u1.y * u2.y + u1.z * u2.z
         // leads to a result of   [0.0009765, -0.0001220, -0.0039062],
         // instead of the correct [0.0006913, -0.0001254, -0.0007909]
-        final Vector3D u1 = new Vector3D(-1321008684645961.0 /   268435456.0,
+        final Coordinates3D u1 = new Coordinates3D(-1321008684645961.0 /   268435456.0,
                                          -5774608829631843.0 /   268435456.0,
                                          -7645843051051357.0 /  8589934592.0);
-        final Vector3D u2 = new Vector3D( 1796571811118507.0 /  2147483648.0,
+        final Coordinates3D u2 = new Coordinates3D( 1796571811118507.0 /  2147483648.0,
                                           7853468008299307.0 /  2147483648.0,
                                           2599586637357461.0 / 17179869184.0);
-        final Vector3D u3 = new Vector3D(12753243807587107.0 / 18446744073709551616.0,
+        final Coordinates3D u3 = new Coordinates3D(12753243807587107.0 / 18446744073709551616.0,
                                          -2313766922703915.0 / 18446744073709551616.0,
                                           -227970081415313.0 /   288230376151711744.0);
-        Vector3D cNaive = new Vector3D(u1.getY() * u2.getZ() - u1.getZ() * u2.getY(),
+        Coordinates3D cNaive = new Coordinates3D(u1.getY() * u2.getZ() - u1.getZ() * u2.getY(),
                                        u1.getZ() * u2.getX() - u1.getX() * u2.getZ(),
                                        u1.getX() * u2.getY() - u1.getY() * u2.getX());
-        Vector3D cAccurate = u1.crossProduct(u2);
+        Coordinates3D cAccurate = u1.crossProduct(u2);
         Assert.assertTrue(u3.distance(cNaive) > 2.9 * u3.getNorm());
         Assert.assertEquals(0.0, u3.distance(cAccurate), 1.0e-30 * cAccurate.getNorm());
     }
@@ -401,13 +401,13 @@ public class Vector3DTest {
             double vx = 10000 * random.nextDouble();
             double vy = 10000 * random.nextDouble();
             double vz = 10000 * random.nextDouble();
-            Vector3D cNaive = new Vector3D(uy * vz - uz * vy, uz * vx - ux * vz, ux * vy
- uy * vx);
-            Vector3D cAccurate = new Vector3D(ux, uy, uz).crossProduct(new Vector3D(vx, vy,
vz));
+            Coordinates3D cNaive = new Coordinates3D(uy * vz - uz * vy, uz * vx - ux * vz,
ux * vy - uy * vx);
+            Coordinates3D cAccurate = new Coordinates3D(ux, uy, uz).crossProduct(new Coordinates3D(vx,
vy, vz));
             Assert.assertEquals(0.0, cAccurate.distance(cNaive), 6.0e-15 * cAccurate.getNorm());
         }
     }
 
-    private void checkVector(Vector3D v, double x, double y, double z) {
+    private void checkVector(Coordinates3D v, double x, double y, double z) {
         Assert.assertEquals(x, v.getX(), 1.0e-12);
         Assert.assertEquals(y, v.getY(), 1.0e-12);
         Assert.assertEquals(z, v.getZ(), 1.0e-12);

http://git-wip-us.apache.org/repos/asf/commons-math/blob/b815d2af/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/DiskGeneratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/DiskGeneratorTest.java
b/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/DiskGeneratorTest.java
index 4f15610..841a87c 100644
--- a/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/DiskGeneratorTest.java
+++ b/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/DiskGeneratorTest.java
@@ -23,7 +23,7 @@ import java.util.List;
 import org.apache.commons.math4.geometry.enclosing.EnclosingBall;
 import org.apache.commons.math4.geometry.euclidean.twod.DiskGenerator;
 import org.apache.commons.math4.geometry.euclidean.twod.Euclidean2D;
-import org.apache.commons.math4.geometry.euclidean.twod.Vector2D;
+import org.apache.commons.math4.geometry.euclidean.twod.Coordinates2D;
 import org.apache.commons.math4.random.UnitSphereRandomVectorGenerator;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.simple.RandomSource;
@@ -35,8 +35,8 @@ public class DiskGeneratorTest {
 
     @Test
     public void testSupport0Point() {
-        List<Vector2D> support = Arrays.asList(new Vector2D[0]);
-        EnclosingBall<Euclidean2D, Vector2D> disk = new DiskGenerator().ballOnSupport(support);
+        List<Coordinates2D> support = Arrays.asList(new Coordinates2D[0]);
+        EnclosingBall<Euclidean2D, Coordinates2D> disk = new DiskGenerator().ballOnSupport(support);
         Assert.assertTrue(disk.getRadius() < 0);
         Assert.assertEquals(0, disk.getSupportSize());
         Assert.assertEquals(0, disk.getSupport().length);
@@ -44,15 +44,15 @@ public class DiskGeneratorTest {
 
     @Test
     public void testSupport1Point() {
-        List<Vector2D> support = Arrays.asList(new Vector2D(1, 2));
-        EnclosingBall<Euclidean2D, Vector2D> disk = new DiskGenerator().ballOnSupport(support);
+        List<Coordinates2D> support = Arrays.asList(new Coordinates2D(1, 2));
+        EnclosingBall<Euclidean2D, Coordinates2D> disk = new DiskGenerator().ballOnSupport(support);
         Assert.assertEquals(0.0, disk.getRadius(), 1.0e-10);
         Assert.assertTrue(disk.contains(support.get(0)));
         Assert.assertTrue(disk.contains(support.get(0), 0.5));
-        Assert.assertFalse(disk.contains(new Vector2D(support.get(0).getX() + 0.1,
+        Assert.assertFalse(disk.contains(new Coordinates2D(support.get(0).getX() + 0.1,
                                                       support.get(0).getY() - 0.1),
                                          0.001));
-        Assert.assertTrue(disk.contains(new Vector2D(support.get(0).getX() + 0.1,
+        Assert.assertTrue(disk.contains(new Coordinates2D(support.get(0).getX() + 0.1,
                                                      support.get(0).getY() - 0.1),
                                         0.5));
         Assert.assertEquals(0, support.get(0).distance(disk.getCenter()), 1.0e-10);
@@ -62,41 +62,41 @@ public class DiskGeneratorTest {
 
     @Test
     public void testSupport2Points() {
-        List<Vector2D> support = Arrays.asList(new Vector2D(1, 0),
-                                               new Vector2D(3, 0));
-        EnclosingBall<Euclidean2D, Vector2D> disk = new DiskGenerator().ballOnSupport(support);
+        List<Coordinates2D> support = Arrays.asList(new Coordinates2D(1, 0),
+                                               new Coordinates2D(3, 0));
+        EnclosingBall<Euclidean2D, Coordinates2D> disk = new DiskGenerator().ballOnSupport(support);
         Assert.assertEquals(1.0, disk.getRadius(), 1.0e-10);
         int i = 0;
-        for (Vector2D v : support) {
+        for (Coordinates2D v : support) {
             Assert.assertTrue(disk.contains(v));
             Assert.assertEquals(1.0, v.distance(disk.getCenter()), 1.0e-10);
             Assert.assertTrue(v == disk.getSupport()[i++]);
         }
-        Assert.assertTrue(disk.contains(new Vector2D(2, 0.9)));
-        Assert.assertFalse(disk.contains(Vector2D.ZERO));
-        Assert.assertEquals(0.0, new Vector2D(2, 0).distance(disk.getCenter()), 1.0e-10);
+        Assert.assertTrue(disk.contains(new Coordinates2D(2, 0.9)));
+        Assert.assertFalse(disk.contains(Coordinates2D.ZERO));
+        Assert.assertEquals(0.0, new Coordinates2D(2, 0).distance(disk.getCenter()), 1.0e-10);
         Assert.assertEquals(2, disk.getSupportSize());
     }
 
     @Test
     public void testSupport3Points() {
-        List<Vector2D> support = Arrays.asList(new Vector2D(1, 0),
-                                               new Vector2D(3, 0),
-                                               new Vector2D(2, 2));
-        EnclosingBall<Euclidean2D, Vector2D> disk = new DiskGenerator().ballOnSupport(support);
+        List<Coordinates2D> support = Arrays.asList(new Coordinates2D(1, 0),
+                                               new Coordinates2D(3, 0),
+                                               new Coordinates2D(2, 2));
+        EnclosingBall<Euclidean2D, Coordinates2D> disk = new DiskGenerator().ballOnSupport(support);
         Assert.assertEquals(5.0 / 4.0, disk.getRadius(), 1.0e-10);
         int i = 0;
-        for (Vector2D v : support) {
+        for (Coordinates2D v : support) {
             Assert.assertTrue(disk.contains(v));
             Assert.assertEquals(5.0 / 4.0, v.distance(disk.getCenter()), 1.0e-10);
             Assert.assertTrue(v == disk.getSupport()[i++]);
         }
-        Assert.assertTrue(disk.contains(new Vector2D(2, 0.9)));
-        Assert.assertFalse(disk.contains(new Vector2D(0.9,  0)));
-        Assert.assertFalse(disk.contains(new Vector2D(3.1,  0)));
-        Assert.assertTrue(disk.contains(new Vector2D(2.0, -0.499)));
-        Assert.assertFalse(disk.contains(new Vector2D(2.0, -0.501)));
-        Assert.assertEquals(0.0, new Vector2D(2.0, 3.0 / 4.0).distance(disk.getCenter()),
1.0e-10);
+        Assert.assertTrue(disk.contains(new Coordinates2D(2, 0.9)));
+        Assert.assertFalse(disk.contains(new Coordinates2D(0.9,  0)));
+        Assert.assertFalse(disk.contains(new Coordinates2D(3.1,  0)));
+        Assert.assertTrue(disk.contains(new Coordinates2D(2.0, -0.499)));
+        Assert.assertFalse(disk.contains(new Coordinates2D(2.0, -0.501)));
+        Assert.assertEquals(0.0, new Coordinates2D(2.0, 3.0 / 4.0).distance(disk.getCenter()),
1.0e-10);
         Assert.assertEquals(3, disk.getSupportSize());
     }
 
@@ -108,12 +108,12 @@ public class DiskGeneratorTest {
         for (int i = 0; i < 500; ++i) {
             double d = 25 * random.nextDouble();
             double refRadius = 10 * random.nextDouble();
-            Vector2D refCenter = new Vector2D(d, new Vector2D(sr.nextVector()));
-            List<Vector2D> support = new ArrayList<>();
+            Coordinates2D refCenter = new Coordinates2D(d, new Coordinates2D(sr.nextVector()));
+            List<Coordinates2D> support = new ArrayList<>();
             for (int j = 0; j < 3; ++j) {
-                support.add(new Vector2D(1.0, refCenter, refRadius, new Vector2D(sr.nextVector())));
+                support.add(new Coordinates2D(1.0, refCenter, refRadius, new Coordinates2D(sr.nextVector())));
             }
-            EnclosingBall<Euclidean2D, Vector2D> disk = new DiskGenerator().ballOnSupport(support);
+            EnclosingBall<Euclidean2D, Coordinates2D> disk = new DiskGenerator().ballOnSupport(support);
             Assert.assertEquals(0.0, refCenter.distance(disk.getCenter()), 3e-9 * refRadius);
             Assert.assertEquals(refRadius, disk.getRadius(), 7e-10 * refRadius);
         }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/b815d2af/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/LineTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/LineTest.java
b/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/LineTest.java
index a7810e7..79e9fa4 100644
--- a/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/LineTest.java
+++ b/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/LineTest.java
@@ -19,10 +19,10 @@ package org.apache.commons.math4.geometry.euclidean.twod;
 import org.apache.commons.math4.exception.MathIllegalArgumentException;
 import org.apache.commons.math4.geometry.Point;
 import org.apache.commons.math4.geometry.euclidean.oned.Euclidean1D;
-import org.apache.commons.math4.geometry.euclidean.oned.Vector1D;
+import org.apache.commons.math4.geometry.euclidean.oned.Coordinates1D;
 import org.apache.commons.math4.geometry.euclidean.twod.Euclidean2D;
 import org.apache.commons.math4.geometry.euclidean.twod.Line;
-import org.apache.commons.math4.geometry.euclidean.twod.Vector2D;
+import org.apache.commons.math4.geometry.euclidean.twod.Coordinates2D;
 import org.apache.commons.math4.geometry.partitioning.Transform;
 import org.apache.commons.math4.util.FastMath;
 import org.junit.Assert;
@@ -32,54 +32,54 @@ public class LineTest {
 
     @Test
     public void testContains() {
-        Line l = new Line(new Vector2D(0, 1), new Vector2D(1, 2), 1.0e-10);
-        Assert.assertTrue(l.contains(new Vector2D(0, 1)));
-        Assert.assertTrue(l.contains(new Vector2D(1, 2)));
-        Assert.assertTrue(l.contains(new Vector2D(7, 8)));
-        Assert.assertTrue(! l.contains(new Vector2D(8, 7)));
+        Line l = new Line(new Coordinates2D(0, 1), new Coordinates2D(1, 2), 1.0e-10);
+        Assert.assertTrue(l.contains(new Coordinates2D(0, 1)));
+        Assert.assertTrue(l.contains(new Coordinates2D(1, 2)));
+        Assert.assertTrue(l.contains(new Coordinates2D(7, 8)));
+        Assert.assertTrue(! l.contains(new Coordinates2D(8, 7)));
     }
 
     @Test
     public void testAbscissa() {
-        Line l = new Line(new Vector2D(2, 1), new Vector2D(-2, -2), 1.0e-10);
+        Line l = new Line(new Coordinates2D(2, 1), new Coordinates2D(-2, -2), 1.0e-10);
         Assert.assertEquals(0.0,
-                            (l.toSubSpace(new Vector2D(-3,  4))).getX(),
+                            (l.toSubSpace(new Coordinates2D(-3,  4))).getX(),
                             1.0e-10);
         Assert.assertEquals(0.0,
-                            (l.toSubSpace(new Vector2D( 3, -4))).getX(),
+                            (l.toSubSpace(new Coordinates2D( 3, -4))).getX(),
                             1.0e-10);
         Assert.assertEquals(-5.0,
-                            (l.toSubSpace(new Vector2D( 7, -1))).getX(),
+                            (l.toSubSpace(new Coordinates2D( 7, -1))).getX(),
                             1.0e-10);
-        Assert.assertEquals( 5.0,
-                             (l.toSubSpace(new Vector2D(-1, -7))).getX(),
+        Assert.assertEquals(5.0,
+                             (l.toSubSpace(new Coordinates2D(-1, -7))).getX(),
                              1.0e-10);
     }
 
     @Test
     public void testOffset() {
-        Line l = new Line(new Vector2D(2, 1), new Vector2D(-2, -2), 1.0e-10);
-        Assert.assertEquals(-5.0, l.getOffset(new Vector2D(5, -3)), 1.0e-10);
-        Assert.assertEquals(+5.0, l.getOffset(new Vector2D(-5, 2)), 1.0e-10);
+        Line l = new Line(new Coordinates2D(2, 1), new Coordinates2D(-2, -2), 1.0e-10);
+        Assert.assertEquals(-5.0, l.getOffset(new Coordinates2D(5, -3)), 1.0e-10);
+        Assert.assertEquals(+5.0, l.getOffset(new Coordinates2D(-5, 2)), 1.0e-10);
     }
 
     @Test
     public void testDistance() {
-        Line l = new Line(new Vector2D(2, 1), new Vector2D(-2, -2), 1.0e-10);
-        Assert.assertEquals(+5.0, l.distance(new Vector2D(5, -3)), 1.0e-10);
-        Assert.assertEquals(+5.0, l.distance(new Vector2D(-5, 2)), 1.0e-10);
+        Line l = new Line(new Coordinates2D(2, 1), new Coordinates2D(-2, -2), 1.0e-10);
+        Assert.assertEquals(+5.0, l.distance(new Coordinates2D(5, -3)), 1.0e-10);
+        Assert.assertEquals(+5.0, l.distance(new Coordinates2D(-5, 2)), 1.0e-10);
     }
 
     @Test
     public void testPointAt() {
-        Line l = new Line(new Vector2D(2, 1), new Vector2D(-2, -2), 1.0e-10);
+        Line l = new Line(new Coordinates2D(2, 1), new Coordinates2D(-2, -2), 1.0e-10);
         for (double a = -2.0; a < 2.0; a += 0.2) {
-            Point<Euclidean1D> pA = new Vector1D(a);
+            Point<Euclidean1D> pA = new Coordinates1D(a);
             Point<Euclidean2D> point = l.toSpace(pA);
             Assert.assertEquals(a, (l.toSubSpace(point)).getX(), 1.0e-10);
             Assert.assertEquals(0.0, l.getOffset(point),   1.0e-10);
             for (double o = -2.0; o < 2.0; o += 0.2) {
-                point = l.getPointAt((Vector1D) pA, o);
+                point = l.getPointAt((Coordinates1D) pA, o);
                 Assert.assertEquals(a, (l.toSubSpace(point)).getX(), 1.0e-10);
                 Assert.assertEquals(o, l.getOffset(point),   1.0e-10);
             }
@@ -88,34 +88,34 @@ public class LineTest {
 
     @Test
     public void testOriginOffset() {
-        Line l1 = new Line(new Vector2D(0, 1), new Vector2D(1, 2), 1.0e-10);
+        Line l1 = new Line(new Coordinates2D(0, 1), new Coordinates2D(1, 2), 1.0e-10);
         Assert.assertEquals(FastMath.sqrt(0.5), l1.getOriginOffset(), 1.0e-10);
-        Line l2 = new Line(new Vector2D(1, 2), new Vector2D(0, 1), 1.0e-10);
+        Line l2 = new Line(new Coordinates2D(1, 2), new Coordinates2D(0, 1), 1.0e-10);
         Assert.assertEquals(-FastMath.sqrt(0.5), l2.getOriginOffset(), 1.0e-10);
     }
 
     @Test
     public void testParallel() {
-        Line l1 = new Line(new Vector2D(0, 1), new Vector2D(1, 2), 1.0e-10);
-        Line l2 = new Line(new Vector2D(2, 2), new Vector2D(3, 3), 1.0e-10);
+        Line l1 = new Line(new Coordinates2D(0, 1), new Coordinates2D(1, 2), 1.0e-10);
+        Line l2 = new Line(new Coordinates2D(2, 2), new Coordinates2D(3, 3), 1.0e-10);
         Assert.assertTrue(l1.isParallelTo(l2));
-        Line l3 = new Line(new Vector2D(1, 0), new Vector2D(0.5, -0.5), 1.0e-10);
+        Line l3 = new Line(new Coordinates2D(1, 0), new Coordinates2D(0.5, -0.5), 1.0e-10);
         Assert.assertTrue(l1.isParallelTo(l3));
-        Line l4 = new Line(new Vector2D(1, 0), new Vector2D(0.5, -0.51), 1.0e-10);
+        Line l4 = new Line(new Coordinates2D(1, 0), new Coordinates2D(0.5, -0.51), 1.0e-10);
         Assert.assertTrue(! l1.isParallelTo(l4));
     }
 
     @Test
     public void testTransform() throws MathIllegalArgumentException {
 
-        Line l1 = new Line(new Vector2D(1.0 ,1.0), new Vector2D(4.0 ,1.0), 1.0e-10);
+        Line l1 = new Line(new Coordinates2D(1.0 ,1.0), new Coordinates2D(4.0 ,1.0), 1.0e-10);
         Transform<Euclidean2D, Euclidean1D> t1 =
             Line.getTransform(0.0, 0.5, -1.0, 0.0, 1.0, 1.5);
         Assert.assertEquals(0.5 * FastMath.PI,
                             ((Line) t1.apply(l1)).getAngle(),
                             1.0e-10);
 
-        Line l2 = new Line(new Vector2D(0.0, 0.0), new Vector2D(1.0, 1.0), 1.0e-10);
+        Line l2 = new Line(new Coordinates2D(0.0, 0.0), new Coordinates2D(1.0, 1.0), 1.0e-10);
         Transform<Euclidean2D, Euclidean1D> t2 =
             Line.getTransform(0.0, 0.5, -1.0, 0.0, 1.0, 1.5);
         Assert.assertEquals(FastMath.atan2(1.0, -2.0),
@@ -126,9 +126,9 @@ public class LineTest {
 
     @Test
     public void testIntersection() {
-        Line    l1 = new Line(new Vector2D( 0, 1), new Vector2D(1, 2), 1.0e-10);
-        Line    l2 = new Line(new Vector2D(-1, 2), new Vector2D(2, 1), 1.0e-10);
-        Vector2D p  = l1.intersection(l2);
+        Line    l1 = new Line(new Coordinates2D( 0, 1), new Coordinates2D(1, 2), 1.0e-10);
+        Line    l2 = new Line(new Coordinates2D(-1, 2), new Coordinates2D(2, 1), 1.0e-10);
+        Coordinates2D p  = l1.intersection(l2);
         Assert.assertEquals(0.5, p.getX(), 1.0e-10);
         Assert.assertEquals(1.5, p.getY(), 1.0e-10);
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/b815d2af/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/NestedLoopsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/NestedLoopsTest.java
b/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/NestedLoopsTest.java
index e46008a..822cea7 100644
--- a/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/NestedLoopsTest.java
+++ b/src/test/java/org/apache/commons/math4/geometry/euclidean/twod/NestedLoopsTest.java
@@ -32,13 +32,13 @@ public class NestedLoopsTest {
 
     @Test
     public void testNestedLoops() throws Exception {
-        Vector2D oneOne = new Vector2D(1.0, 1.0);
-        Vector2D oneNegativeOne = new Vector2D(1.0, -1.0);
-        Vector2D negativeOneNegativeOne = new Vector2D(-1.0, -1.0);
-        Vector2D negativeOneOne = new Vector2D(-1.0, 1.0);
-        Vector2D origin = new Vector2D(0, 0);
+        Coordinates2D oneOne = new Coordinates2D(1.0, 1.0);
+        Coordinates2D oneNegativeOne = new Coordinates2D(1.0, -1.0);
+        Coordinates2D negativeOneNegativeOne = new Coordinates2D(-1.0, -1.0);
+        Coordinates2D negativeOneOne = new Coordinates2D(-1.0, 1.0);
+        Coordinates2D origin = new Coordinates2D(0, 0);
 
-        Vector2D [] vertices = new Vector2D[]{
+        Coordinates2D [] vertices = new Coordinates2D[]{
                 oneOne,
                 oneNegativeOne,
                 negativeOneNegativeOne,
@@ -55,8 +55,8 @@ public class NestedLoopsTest {
         surroundedField.setAccessible(Boolean.TRUE);
         loopField.setAccessible(Boolean.TRUE);
         List<NestedLoops> surrounded = (List<NestedLoops>) surroundedField.get(nestedLoops);
-        Vector2D[] loop = (Vector2D []) loopField.get(surrounded.get(0));
-        Set<Vector2D> vertexSet = new HashSet<>(Arrays.asList(loop));
+        Coordinates2D[] loop = (Coordinates2D []) loopField.get(surrounded.get(0));
+        Set<Coordinates2D> vertexSet = new HashSet<>(Arrays.asList(loop));
         Assert.assertTrue(vertexSet.contains(oneOne));
         Assert.assertTrue(vertexSet.contains(oneNegativeOne));
         Assert.assertTrue(vertexSet.contains(negativeOneNegativeOne));


Mime
View raw message