How can I test if an oriented rectangle contains another oriented rectangle?
- by gronzzz
I have the following situation:
To detect whether is the red rectangle is inside orange area I use this function:
- (BOOL)isTile:(CGPoint)tile insideCustomAreaMin:(CGPoint)min max:(CGPoint)max {
if ((tile.x < min.x) ||
(tile.x > max.x) ||
(tile.y < min.y) ||
(tile.y > max.y)) {
NSLog(@" Object is…