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); }