Advertisement
Guest User

Untitled

a guest
Sep 13th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. bool check_collision( int Ax, int Ay, int Aw, int Ah, int Bx, int By, int Bw, int Bh )
  2. {
  3. if( Ax + Aw < Bx )
  4. {
  5. return false;
  6. }
  7. if( Ax > Bx + Bw )
  8. {
  9. return false;
  10. }
  11. if( Ay + Ah < By )
  12. {
  13. return false;
  14. }
  15. if( Ay > By + Bh )
  16. {
  17. return false;
  18. }
  19.  
  20. return true;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement