12 const static Box Zero;
50 return box.X == X && box.Y == Y && box.Width == Width && box.Height == Height;
53 constexpr Box() : X(0), Y(0), Width(0), Height(0) {};
55 constexpr Box(int32 x, int32 y, int32 width, int32 height) : X(x), Y(y), Width(width), Height(height) {};
57 constexpr Box(Int2 position, Int2 size) : X(position.X), Y(position.Y), Width(size.X), Height(size.Y) {};
59 bool Intersects(
const Int2 &ray)
const
61 return ray.X >= X && ray.Y >= Y && ray.X <= X + Width && ray.Y <= Y + Height;