public class Intersection extends Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Computes the intersection point of two lines.
public static Coordinate intersection(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
In general it is not possible to accurately compute the intersection point of two lines, due to numerical roundoff. This is particularly true when the input lines are nearly parallel. This routine uses numerical conditioning on the input values to ensure that the computed value should be very close to the correct value.
p1- an endpoint of line 1
p2- an endpoint of line 1
q1- an endpoint of line 2
q2- an endpoint of line 2
CGAlgorithmsDD.intersection(Coordinate, Coordinate, Coordinate, Coordinate)
Copyright © 2020. All rights reserved.