Rect.positionAndSize constructor

Rect.positionAndSize(
  1. int x,
  2. int y,
  3. int width,
  4. int height,
)

Create a Rect at the given position coordinates with the given width and height

Implementation

Rect.positionAndSize(int x, int y, int width, int height)
    : position = Vec2(x, y),
      size = Vec2(width, height);