Esempio n. 1
0
 public bool Contiene(Rettangolo r)
 {
     if (x <= r.x && y <= r.y && x + width >= r.x + r.width && y + height >= r.y + r.height)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
 public bool Contiene(Rettangolo r)
 {
     if (r.x >= this.x && r.width + r.x <= width + x)
     {
         if (r.y >= this.y && r.height + r.y <= height + y)
         {
             return(true);
         }
         return(false);
     }
     else
     {
         return(false);
     }
 }