* Returns true if the rectangle contains the given rectangle * @param rectangle - rectangle to test * @returns True if the rectangle contain the given rectangle, otherwise false * @example * if (rect.containsRectangle(myRect)) { * // do something * }
(rectangle: Rect)
| 250 | * } |
| 251 | */ |
| 252 | containsRectangle(rectangle: Rect) { |
| 253 | return ( |
| 254 | rectangle.left >= this.left && |
| 255 | rectangle.right <= this.right && |
| 256 | rectangle.top >= this.top && |
| 257 | rectangle.bottom <= this.bottom |
| 258 | ); |
| 259 | } |
| 260 | |
| 261 | /** |
| 262 | * Check if this rectangle is identical to the specified one. |
no outgoing calls
no test coverage detected