Example #1
0
        public bool Overlaps(BoxBase otherBox)
        {
            bool c1 = otherBox.XMax >= XMin;
            bool c2 = otherBox.XMin <= XMax;
            bool c3 = otherBox.YMax >= YMin;
            bool c4 = otherBox.YMin <= YMax;

            return(c1 && c2 && c3 && c4);
        }
Example #2
0
        public bool Overlaps(BoxBase otherBox)
        {
            var c1 = otherBox.xMax >= xMin;
            var c2 = otherBox.xMin <= xMax;
            var c3 = otherBox.yMax >= yMin;
            var c4 = otherBox.yMin <= yMax;

            return(c1 && c2 && c3 && c4);
        }