How to detect if a certain range resides (partly) within an other range?
- by Tom
Lets say I've got two squares and I know their positions, a red and blue square:
redTopX;
redTopY;
redBotX;
redBotY;
blueTopX;
blueTopY;
blueBotX;
blueBotY;
Now, I want to check if square blue resides (partly) within (or around) square red. This can happen in a lot of situations, as you can see in this image I created to illustrate my situation…