use of com.revolsys.geometry.algorithm.RobustLineIntersector in project com.revolsys.open by revolsys.
the class RobustLineIntersectorTest method testCollinear3.
public void testCollinear3() {
final RobustLineIntersector i = new RobustLineIntersector();
final Point p1 = new PointDoubleXY(10, 10);
final Point p2 = new PointDoubleXY(20, 10);
final Point q1 = new PointDoubleXY(15, 10);
final Point q2 = new PointDoubleXY(30, 10);
i.computeIntersectionPoints(p1, p2, q1, q2);
assertEquals(LineIntersector.COLLINEAR_INTERSECTION, i.getIntersectionCount());
assertTrue(!i.isProper());
assertTrue(i.hasIntersection());
}
use of com.revolsys.geometry.algorithm.RobustLineIntersector in project com.revolsys.open by revolsys.
the class RobustLineIntersectorTest method testCollinear2.
public void testCollinear2() {
final RobustLineIntersector i = new RobustLineIntersector();
final Point p1 = new PointDoubleXY(10, 10);
final Point p2 = new PointDoubleXY(20, 10);
final Point q1 = new PointDoubleXY(20, 10);
final Point q2 = new PointDoubleXY(30, 10);
i.computeIntersectionPoints(p1, p2, q1, q2);
assertEquals(LineIntersector.POINT_INTERSECTION, i.getIntersectionCount());
assertTrue(!i.isProper());
assertTrue(i.hasIntersection());
}
Aggregations