Function encompass

Returns a copy of rect with rect resized so it also encompasses points. If provided point(s) are within bounds of rect, a copy of rect is returned.