nonRobustComputeEdgeDistance static method
This function is non-robust, since it may compute the square of large numbers. Currently not sure how to improve this.
Implementation
static double nonRobustComputeEdgeDistance(
Coordinate p, Coordinate p1, Coordinate p2) {
double dx = p.x - p1.x;
double dy = p.y - p1.y;
double dist = math.sqrt(dx * dx + dy * dy); // dummy value
//TODO Assert.isTrue(! (dist == 0.0 && ! p.equals(p1)), "Invalid distance calculation");
return dist;
}