does rectangle contain or overlap another rectangle?
I have an assignment to that takes in userinput(4 doubles: x y coordinates for the center of the rectangle, and width + height of the rectangle) to create 2 rectangles and two of the things we have to do with the info is check if one rectangle contains the other, and if they overlap with eachother.
I can't seem to think of the logic for how to tell if they contain and overlap... I have the rest of the program written but am having troubles with this. Can anyone point me in the right direction for how to go about this? Thanks.