Line implements Embedding<Euclidean3D, Euclidean1D> { public Line revert() { final Line reverted = new Line(this); reverted.direction = reverted.direction.negate(); return reverted; } Line(final Vector3D p1, final Vector3D p2, final double tolerance);  Line(final Line line); @Deprecated  Line(final Vector3D p1, final Vector3D p2); void reset(final Vector3D p1, final Vector3D p2); double getTolerance(); Line revert(); Vector3D getDirection(); Vector3D getOrigin(); double getAbscissa(final Vector3D point); Vector3D pointAt(final double abscissa); Vector1D toSubSpace(Vector<Euclidean3D> vector); Vector3D toSpace(Vector<Euclidean1D> vector); Vector1D toSubSpace(final Point<Euclidean3D> point); Vector3D toSpace(final Point<Euclidean1D> point); boolean isSimilarTo(final Line line); boolean contains(final Vector3D p); double distance(final Vector3D p); double distance(final Line line); Vector3D closestPoint(final Line line); Vector3D intersection(final Line line); SubLine wholeLine();  }
@Test public void testRevert() { Line line = new Line(new Vector3D(1653345.6696423641, 6170370.041579291, 90000), new Vector3D(1650757.5050732433, 6160710.879908984, 0.9), 1.0e-10); Vector3D expected = line.getDirection().negate(); Line reverted = line.revert(); Assert.assertArrayEquals(expected.toArray(), reverted.getDirection().toArray(), 0); }