154155156157158159160161162163
@Test public void testDistance() { // y=x+1; Line l = new Line(1, 1); CPoint p = new Coordinate2D(0, 0); double d = l.distance(p); assertTrue(MyDouble.approximateEquals(Math.sqrt(2) / 2d, d)); } }