private double calculateRelation(MutableCoord P1,MutableCoord P2,MutableCoord P3){
  double d=distancePointLinesegment(P1,P2,P3);
  double r=calcEuclideanDistance(P1,P3);
  double dist1=Math.sqrt((r * r) - (d * d));
  double dist2=calcEuclideanDistance(P1,P2);
  double rel=dist1 / dist2;
  return rel;
}

private double calculateRelation ( MutableCoord P1 , MutableCoord P2 , MutableCoord P3 ) { double d = distancePointLinesegment ( P1 , P2 , P3 ) ; double r = calcEuclideanDistance ( P1 , P3 ) ; double dist1 = Math . sqrt ( ( r * r ) - ( d * d ) ) ; double dist2 = calcEuclideanDistance ( P1 , P2 ) ; double rel = dist1 / dist2 ; return rel ; }
calculates the relation made by the segment formed by the points p1 and p2 and the point p3 .
