Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. // Иначе вернуть -1
  2. public static int IndexOfInnerRectangle(Rectangle r1, Rectangle r2)
  3. {
  4.  
  5. if (AreIntersected(r1, r2))
  6. if ((r1.Left >= r2.Left) && (r1.Top >= r2.Top) && (r1.Bottom <= r2.Bottom) && (r1.Right <= r2.Right))
  7. return 0;
  8. else if ((r2.Left >= r1.Left) && (r2.Top >= r1.Top) && (r2.Bottom <= r1.Bottom) && (r2.Right <= r1.Right))
  9. return 1;
  10. return -1;
  11.  
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement