diff options
author | 杨宇千 <crupest@outlook.com> | 2019-09-17 16:48:39 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-09-17 16:48:39 +0800 |
commit | 154b5b838edfdcef93cd0a33c013ad7f5f9d7337 (patch) | |
tree | 0f330076224f1195bf4f31a09a456d797a45eb93 /include/cru | |
parent | bea876a3b1a241e6127c06a14684a6dc9fcc9516 (diff) | |
download | cru-154b5b838edfdcef93cd0a33c013ad7f5f9d7337.tar.gz cru-154b5b838edfdcef93cd0a33c013ad7f5f9d7337.tar.bz2 cru-154b5b838edfdcef93cd0a33c013ad7f5f9d7337.zip |
...
Diffstat (limited to 'include/cru')
-rw-r--r-- | include/cru/platform/graphic_base.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/cru/platform/graphic_base.hpp b/include/cru/platform/graphic_base.hpp index fd479e56..c9c4f629 100644 --- a/include/cru/platform/graphic_base.hpp +++ b/include/cru/platform/graphic_base.hpp @@ -14,6 +14,14 @@ struct Point final { float y = 0; }; +constexpr Point operator+(const Point& left, const Point& right) { + return Point(left.x + right.x, left.y + right.y); +} + +constexpr Point operator-(const Point& left, const Point& right) { + return Point(left.x - right.x, left.y - right.y); +} + constexpr bool operator==(const Point& left, const Point& right) { return left.x == right.x && left.y == right.y; } |