computeIntersection method

void computeIntersection(
  1. Coordinate p1,
  2. Coordinate p2,
  3. Coordinate p3,
  4. Coordinate p4,
)

Computes the intersection of the lines p1-p2 and p3-p4. This function computes both the bool value of the hasIntersection test and the (approximate) value of the intersection point itself (if there is one).

Implementation

void computeIntersection(
    Coordinate p1, Coordinate p2, Coordinate p3, Coordinate p4) {
  inputLines[0][0] = p1;
  inputLines[0][1] = p2;
  inputLines[1][0] = p3;
  inputLines[1][1] = p4;
  result = computeIntersect(p1, p2, p3, p4);
//numIntersects++;
}