diff --git a/src/olympic/studio/modlib/include/studio/selectiontracker.hpp b/src/olympic/studio/modlib/include/studio/selectiontracker.hpp index 99484ec7..ea21bad2 100644 --- a/src/olympic/studio/modlib/include/studio/selectiontracker.hpp +++ b/src/olympic/studio/modlib/include/studio/selectiontracker.hpp @@ -5,6 +5,7 @@ #include #include +#include #include namespace studio { @@ -13,6 +14,10 @@ struct Selection { ox::Point a, b; constexpr Selection() noexcept = default; constexpr Selection(ox::Point const&pA, ox::Point const&pB) noexcept: a(pA), b(pB) {} + [[nodiscard]] + constexpr ox::Size size() const noexcept { + return {b.x - a.x, b.y - a.y}; + } }; constexpr auto iterateSelection(studio::Selection const&sel, auto const&cb) {