15 Vector2i(
int x,
int y) : x(x), y(y) {}
19 return Vector2i(x + other.x, y + other.y);
24 return Vector2i(x - other.x, y - other.y);
30 return Vector2i(x * scalar, y * scalar);
36 return Vector2i(x / scalar, y / scalar);
67 bool operator==(
const Vector2i &other)
const
69 return x == other.x && y == other.y;
72 bool operator!=(
const Vector2i &other)
const
74 return !(*
this == other);
79 return x * other.x + y * other.y;
110 Size2i() : width(0), height(0) {}
111 Size2i(
int width,
int height) : width(width), height(height) {}
113 void operator*=(
int scalar)
119 template <
typename T>
120 Size2i operator*(T scalar)
const
122 return Size2i(width * scalar, height * scalar);
127 return width * height;
132 return width > height ? width : height;
137 return width < height ? width : height;