From 158409abceaf9fb902f9b9bac086267220ce5ecc Mon Sep 17 00:00:00 2001 From: JacobCrabill Date: Mon, 23 Mar 2020 19:37:28 -0700 Subject: [PATCH] Vector3f: Add operator+/- for scalars --- matrix/Vector3.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/matrix/Vector3.hpp b/matrix/Vector3.hpp index 5f463b61cb..6e8cc601a1 100644 --- a/matrix/Vector3.hpp +++ b/matrix/Vector3.hpp @@ -75,11 +75,21 @@ public: return Matrix31::operator+(other); } + inline Vector3 operator+(Type scalar) const + { + return Matrix31::operator+(scalar); + } + inline Vector3 operator-(Vector3 other) const { return Matrix31::operator-(other); } + inline Vector3 operator-(Type scalar) const + { + return Matrix31::operator-(scalar); + } + inline Vector3 operator-() const { return Matrix31::operator-();