diff options
Diffstat (limited to 'src/Geometry.h')
| -rw-r--r-- | src/Geometry.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Geometry.h b/src/Geometry.h index d02a25bbb..a08c5c8f0 100644 --- a/src/Geometry.h +++ b/src/Geometry.h @@ -69,6 +69,9 @@ public: constexpr Interval Offset(XYPOSITION offset) const noexcept { return {left + offset, right + offset}; } + [[nodiscard]] static constexpr Interval FromLeftAndWidth(XYPOSITION left_, XYPOSITION width) { + return {left_, left_+width}; + } }; /** |
