protected boolean isOutside(MutableCoord P1,MutableCoord P2,MutableCoord P3){
  double minx=Math.min(P1.getX(),P2.getX()), miny=Math.min(P1.getY(),P2.getY());
  double maxx=Math.max(P1.getX(),P2.getX()), maxy=Math.max(P1.getY(),P2.getY());
  double x=P3.getX(), y=P3.getY();
  if (x >= minx && x <= maxx && y >= miny && y <= maxy)   return false;
 else   return true;
}

protected boolean isOutside ( MutableCoord P1 , MutableCoord P2 , MutableCoord P3 ) { double minx = Math . min ( P1 . getX ( ) , P2 . getX ( ) ) , miny = Math . min ( P1 . getY ( ) , P2 . getY ( ) ) ; double maxx = Math . max ( P1 . getX ( ) , P2 . getX ( ) ) , maxy = Math . max ( P1 . getY ( ) , P2 . getY ( ) ) ; double x = P3 . getX ( ) , y = P3 . getY ( ) ; if ( x >= minx && x <= maxx && y >= miny && y <= maxy ) return false ; else return true ; }
test whether the point p3 is inside the bounding box of the segment formed by points p1 and p2
