Untitled
public text v1 · immutableBOOL collision(box *object1, box *object2) {
if(object1->lowerright.x<object2->upperleft.x) {
return FALSE;
}
if(object1->upperleft.x>object2->lowerright.x) {
return FALSE;
}
if(object1.lowerright.y>object2.upperright.y) {
return FALSE;
}
if(object1.upperleft.y<object2.lowerleft.y) {
return FALSE;
}
return TRUE;
}