RectFromPosSizeMax returns an [image.Rectangle] from the floor of pos and ceil of size.
(pos, size Vector2)
| 157 | // RectFromPosSizeMax returns an [image.Rectangle] from the floor of pos |
| 158 | // and ceil of size. |
| 159 | func RectFromPosSizeMax(pos, size Vector2) image.Rectangle { |
| 160 | tp := pos.ToPointFloor() |
| 161 | ts := size.ToPointCeil() |
| 162 | return image.Rect(tp.X, tp.Y, tp.X+ts.X, tp.Y+ts.Y) |
| 163 | } |
| 164 | |
| 165 | // RectFromPosSizeMax returns an [image.Rectangle] from the ceil of pos |
| 166 | // and floor of size. |