libs/base/src/base/size.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | namespace eu | ||
| 4 | { | ||
| 5 | /** \addtogroup math | ||
| 6 | * @{ | ||
| 7 | */ | ||
| 8 | |||
| 9 | /// a size | ||
| 10 | struct Size | ||
| 11 | { | ||
| 12 | int width; | ||
| 13 | int height; | ||
| 14 | }; | ||
| 15 | ✗ | constexpr bool operator==(const Size& lhs, const Size& rhs) | |
| 16 | { | ||
| 17 | ✗ | return lhs.width == rhs.width | |
| 18 | ✗ | && lhs.height == rhs.height; | |
| 19 | } | ||
| 20 | |||
| 21 | /// converts a 2d unit vector to a string, prefer fmt | ||
| 22 | std::string string_from(const Size& v); | ||
| 23 | |||
| 24 | /** @}*/ | ||
| 25 | } | ||
| 26 | |||
| 27 | ADD_DEFAULT_FORMATTER(eu::Size, std::string, eu::string_from); | ||
| 28 |