Advertisement
Guest User

rekt

a guest
Oct 9th, 2015
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. boolean left = (Math.abs(centerX1 - (width1 / 2)) < Math.abs((centerX2 + (width2 / 2)))) ||
  2. (Math.abs(centerX1 - (width1 / 2)) == Math.abs((centerX2 + (width2 / 2))));
  3. boolean right = ((centerX1 + (width1 / 2)) > (centerX2 - (width2 / 2))) ||
  4. ((centerX1 + (width1 / 2)) == (centerX2 - (width2 / 2)));
  5. boolean up = ((centerY1 + (length1 / 2)) > (centerY2 - (length2 / 2))) ||
  6. ((centerY1 + (length1 / 2)) == (centerY2 - (length2 / 2)));
  7. boolean down = ((centerY1 - (length1 / 2)) < (centerY2 + (length2 / 2))) ||
  8. ((centerY1 - (length1 / 2)) == (centerY2 + (length2 / 2)));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement