Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int poz(int x1,int y1,int l1,int i1,int x2,int y2,int l2,int i2)
- {
- if(x2>x1 && y2>y1)
- {
- if(l2<l1-(y2-y1) && i2<i1-(x2-x1))
- return 0;
- }
- if(x1>x2 && y1>y2)
- {
- if(l1<l2-(y1-y2) && i1<i2-(x1-x2))
- return 0;
- }
- if(x1==x2 && y1==y2)
- {
- if(l1==l2 && i1==i2)
- return 1;
- }
- if(x1+l1<x2 || y1+i1<y2)
- return 2;
- if(x2+l2<x1 || y2+i2<y1)
- return 2;
- return 3;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement