Closed Thraka closed 3 years ago
Fair enough :D. There is a ChangeSize
function that does what you're expecting. It's also worthy to mention that the Expand
function is useful to shrink rectangles by giving negative changes; I frequently use rect.Expand(-1, -1).Positions()
to iterate over only the inner points of a rectangle without touching the outer points.
With that in mind, any suggestions on a better name?
Rectangle.Expand
says:Returns a new rectangle, expanded to include the additional specified rows/columns.
I interpreted this to mean that the rows/columns are added to the right and bottom. I would adjust this to indicate what happens which is the rectangle expands on all sides by the specified amounts.