From ba651a82d585c181e9632fadba5bb4d683842d44 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 14 Mar 2017 18:19:06 -0400 Subject: better slash, scale fixes --- include/vector2.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/vector2.hpp') diff --git a/include/vector2.hpp b/include/vector2.hpp index 828654c..5671ccd 100644 --- a/include/vector2.hpp +++ b/include/vector2.hpp @@ -57,6 +57,11 @@ struct vector2 { return vector2(x * n, y * n); } + vector2 operator*=(const T& n) { + x *= n, y *= n; + return *this; + } + // division vector2 operator/(const vector2& v) const { return vector2(x / v.x, y / v.y); -- cgit v1.2.3