//Returns true if a and b are touching (edges must overlap) public static bool CheckIntersect(SimpleRect a, SimpleRect b) { return(!(b.Left() > a.Right() || b.Right() < a.Left() || b.Top() < a.Bottom() || b.Bottom() > a.Top())); }
//Returns true if a and b are touching (edges inclusive) public static bool CheckCollision(SimpleRect a, SimpleRect b) { return(!(b.Left() >= a.Right() || b.Right() <= a.Left() || b.Top() <= a.Bottom() || b.Bottom() >= a.Top())); }