in reply to Re^2: Checking if squares intersect
in thread Checking if squares intersect

Your logic only holds with the additional property that the squares have their edges parallel to the x and y axis. If that isn't the case, your logic fails.