aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/GraphBase.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-10 15:52:15 +0800
committercrupest <crupest@outlook.com>2020-11-10 15:52:15 +0800
commit2d4a5df468f8bc13fbb657e010c393365ef79bda (patch)
tree4ee7865663348ede1a961209c980fd614d727859 /include/cru/platform/GraphBase.hpp
parent02ed6999e9db0c20c3f55ab9c695f939aacb110c (diff)
downloadcru-2d4a5df468f8bc13fbb657e010c393365ef79bda.tar.gz
cru-2d4a5df468f8bc13fbb657e010c393365ef79bda.tar.bz2
cru-2d4a5df468f8bc13fbb657e010c393365ef79bda.zip
...
Diffstat (limited to 'include/cru/platform/GraphBase.hpp')
-rw-r--r--include/cru/platform/GraphBase.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/cru/platform/GraphBase.hpp b/include/cru/platform/GraphBase.hpp
index 6700765e..2b40898e 100644
--- a/include/cru/platform/GraphBase.hpp
+++ b/include/cru/platform/GraphBase.hpp
@@ -22,6 +22,12 @@ struct Point final {
return fmt::format(u"({}, {})", ToUtf16String(x), ToUtf16String(y));
}
+ constexpr Point& operator+=(const Point& other) {
+ this->x += other.x;
+ this->y += other.y;
+ return *this;
+ }
+
float x = 0;
float y = 0;
};