Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Иначе вернуть -1
- public static int IndexOfInnerRectangle(Rectangle r1, Rectangle r2)
- {
- if (AreIntersected(r1, r2))
- if ((r1.Left >= r2.Left) && (r1.Top >= r2.Top) && (r1.Bottom <= r2.Bottom) && (r1.Right <= r2.Right))
- return 0;
- else if ((r2.Left >= r1.Left) && (r2.Top >= r1.Top) && (r2.Bottom <= r1.Bottom) && (r2.Right <= r1.Right))
- return 1;
- return -1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement