double almostEquals(Point2D p1,Point2D p2,double tol){
  double sepX=p1.getX() - p2.getX();
  double sepY=p1.getY() - p2.getY();
  double sep=Math.sqrt(sepX * sepX + sepY * sepY);
  if (sep <= tol)   return sep;
 else   return Double.MAX_VALUE;
}

double almostEquals ( Point2D p1 , Point2D p2 , double tol ) { double sepX = p1 . getX ( ) - p2 . getX ( ) ; double sepY = p1 . getY ( ) - p2 . getY ( ) ; double sep = Math . sqrt ( sepX * sepX + sepY * sepY ) ; if ( sep <= tol ) return sep ; else return Double . MAX_VALUE ; }
returns the straight line separation in pixels between the specified points if separation is equal to or less than the specified tolerance amount , else returns double . max_value
