boolean insertInSeg1 = false;
boolean insertInSeg2 = false;
//find if the intersection point is at end point of one of the segments, if so use that point
//segment 1
if (coordsComparator.compare(newNode, seg1Node1) == 0) {
intNode = seg1Node1;
} else if (coordsComparator.compare(newNode, seg1Node2) == 0) {
intNode = seg1Node2;
} else {
insertInSeg1 = true;