protected static final boolean intersects(double xmin1,double ymin1,double xmax1,double ymax1,double xmin2,double ymin2,double xmax2,double ymax2){
  return !((xmax1 <= xmin2) || (ymax1 <= ymin2) || (xmin1 >= xmax2)|| (ymin1 >= ymax2));
}

protected static final boolean intersects ( double xmin1 , double ymin1 , double xmax1 , double ymax1 , double xmin2 , double ymin2 , double xmax2 , double ymax2 ) { return ! ( ( xmax1 <= xmin2 ) || ( ymax1 <= ymin2 ) || ( xmin1 >= xmax2 ) || ( ymin1 >= ymax2 ) ) ; }
determines if two rectangles intersect . actually , this method determines if two rectangles don ' t intersect , and then returns a negation of that result . but the bottom line is the same .
