#ifndef BWIDGETS_SIZE_HPP #define BWIDGETS_SIZE_HPP #include namespace bwidgets { struct Size { int w; int h; [[nodiscard]] inline auto operator-() const -> Size { return {-w, -h}; } [[nodiscard]] inline auto operator+(const Size& s) const -> Size { return {w + s.w, h + s.h}; } [[nodiscard]] inline auto operator-(const Size& s) const -> Size { return {w - s.w, h - s.h}; } template [[nodiscard]] inline auto operator*(N a) const -> Size { return {a * w, a * h}; } }; } #endif