[nostalgia/geo] Fix Point + and * operators to return the computed result

This commit is contained in:
Gary Talent 2022-03-10 19:40:56 -06:00
parent b502b8cc30
commit 4dd1d4331b

View File

@ -69,9 +69,9 @@ constexpr Point::Point(int x, int y) noexcept {
constexpr Point Point::operator+(const geo::Point &p) const noexcept {
auto out = *this;
out.x += x;
out.y += y;
return p;
out.x += p.x;
out.y += p.y;
return out;
}
constexpr Point Point::operator-(const geo::Point &p) const noexcept {
@ -83,9 +83,9 @@ constexpr Point Point::operator-(const geo::Point &p) const noexcept {
constexpr Point Point::operator*(const geo::Point &p) const noexcept {
auto out = *this;
out.x *= x;
out.y *= y;
return p;
out.x *= p.x;
out.y *= p.y;
return out;
}
constexpr Point Point::operator/(const geo::Point &p) const noexcept {