There\'s a lot of questions about intersections between line segments here at stackowerflow and here is one more! Sorry, but I need help to understand how to calculate inter
public void fixData() { slope = (p2.getY() - p1.getY()) / (p2.getX() - p1.getX()); yInt = p1.getY() - slope * p1.getX(); xInt = (-yInt) / slope; }