Community
Participate
Working Groups
return getP1().getDistance(getP2());
}
/**
* Returns the {@link Point} representing the mid-point of this {@link Line}
*
* @return the mid-point of this {@link Line}
*/
public Point getMidPoint() {
Point p1 = getP1();
Point p2 = getP2();
return new Point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2);
// TODO: add specialized getOverlap()