diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2022-08-28 10:14:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-28 10:14:43 +0200 |
| commit | 52c0ba544c55695b0fb0e3c5e9871fe599f7d36d (patch) | |
| tree | fe41941854970f4ef9dcd20627fe49ae18a21883 /src/helpers/Vector2D.hpp | |
| parent | 8b5c64c8fd1e911965a217ee4980a327208afdf7 (diff) | |
Viewporter implementaion (#585)
Implementation of the `wp_viewporter` core protocol and some bugfixes
Diffstat (limited to 'src/helpers/Vector2D.hpp')
| -rw-r--r-- | src/helpers/Vector2D.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helpers/Vector2D.hpp b/src/helpers/Vector2D.hpp index 7ca52a68..557cdb53 100644 --- a/src/helpers/Vector2D.hpp +++ b/src/helpers/Vector2D.hpp @@ -35,6 +35,10 @@ class Vector2D { return a.x != x || a.y != y; } + Vector2D operator*(const Vector2D& a) const { + return Vector2D(this->x * a.x, this->y * a.y); + } + Vector2D clamp(const Vector2D& min, const Vector2D& max = Vector2D()); Vector2D floor(); |
