Ejemplo n.º 1
0
        public bool Intersects(Rectangle other)
        {
            if (other.X1 <= this.X2 &&
                other.X2 >= this.X1 &&
                other.Y1 <= this.Y2 &&
                other.Y2 >= this.Y1)
            {
                return true;
            }

            return false;
        }
Ejemplo n.º 2
0
        public bool IsInside(Rectangle other)
        {
            if (other.X2 <= this.X2 &&
                other.X1 >= this.X1 &&
                other.Y1 >= this.Y1 &&
                other.Y2 <= this.Y2)
            {
                return true;
            }

            return false;
        }