From 562bf6c4b85d4a67127fc3fdfc7c59a013c5e747 Mon Sep 17 00:00:00 2001 From: subcrip Date: Sun, 24 Nov 2024 08:16:24 +0000 Subject: [PATCH] Update geometry/point.cc Signed-off-by: subcrip --- geometry/point.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/geometry/point.cc b/geometry/point.cc index 2032cd0..68df850 100644 --- a/geometry/point.cc +++ b/geometry/point.cc @@ -14,10 +14,10 @@ template struct point { inline point operator*(const T& a) const { return point(x * a, y * a); } inline T operator*(const point& rhs) const { return x * rhs.y - y * rhs.x; } inline point operator/(const T& a) const { return point(x / a, y / a); } - inline point operator+=(const point& rhs) { x += rhs.x, y += rhs.y; return *this; } - inline point operator-=(const point& rhs) { x -= rhs.x, y -= rhs.y; return *this; } - inline point operator*=(const T& a) { x *= a, y *= a; return *this; } - inline point operator/=(const T& a) { x /= a, y /= a; return *this; } + inline point& operator+=(const point& rhs) { x += rhs.x, y += rhs.y; return *this; } + inline point& operator-=(const point& rhs) { x -= rhs.x, y -= rhs.y; return *this; } + inline point& operator*=(const T& a) { x *= a, y *= a; return *this; } + inline point& operator/=(const T& a) { x /= a, y /= a; return *this; } inline bool operator==(const point& rhs) const { return x == rhs.x and y == rhs.y; } inline bool operator!=(const point& rhs) const { return not (*this == rhs); }