The problem is in the data, where points are very close together, but the comparison method only was accurate to 6 decimal places. After upping the accuracy to 9 decimal places, everything sorted...
Type: Posts; User: Willenson
The problem is in the data, where points are very close together, but the comparison method only was accurate to 6 decimal places. After upping the accuracy to 9 decimal places, everything sorted...
You are correct, it should be
if ((p1.compareToXY(diagPoint) == 0) || (p2.compareToXY(diagPoint) == 0))
but that only means I got less diagnostics than what I wanted.
The equals and...
final static public Point diagPoint = new Point("308.540978536647", "204.89781897342627");
/**
* compare points by x,y
*/
public static final Comparator<Point> pointComp = new...