All pastes #240320 Raw Edit

Something

public text v1 · immutable
·published 2006-11-05 18:36 UTC
rendered paste body
    bool collision(Object& ll, Object& rr)
    {
        Coord llc = ll.get_coordinate();
        Coord rrc = rr.get_coordinate();

        if((llc.x <= rrc.x && llc.x + ll.width() >= rrc.x) ||
            (rrc.x <= llc.x && rrc.x + rr.width() >= llc.x))
            if((llc.y <= rrc.y &&  llc.y + ll.height() >= rrc.y) ||
                (rrc.y <= llc.y && rrc.y + rr.height() >= llc.y))
                return true;
        return false;
    }