SHARE
TWEET

Untitled

a guest Sep 13th, 2017 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Top