contains method
Tests whether this rectangle entirely contains another rectangle.
@param {goog.math.Rect|goog.math.Coordinate} another The rectangle to test for containment. @return {bool} Whether this rectangle contains given rectangle or coordinate.
Implementation
bool contains(Rect another)
{
return this.left <= another.left &&
this.left + this.width >= another.left + another.width &&
this.top <= another.top &&
this.top + this.height >= another.top + another.height;
}