Vector3f: Add operator+/- for scalars

This commit is contained in:
JacobCrabill
2020-03-23 19:37:28 -07:00
committed by Julian Kent
parent a504b6e881
commit 158409abce
+10
View File
@@ -75,11 +75,21 @@ public:
return Matrix31::operator+(other); return Matrix31::operator+(other);
} }
inline Vector3 operator+(Type scalar) const
{
return Matrix31::operator+(scalar);
}
inline Vector3 operator-(Vector3 other) const inline Vector3 operator-(Vector3 other) const
{ {
return Matrix31::operator-(other); return Matrix31::operator-(other);
} }
inline Vector3 operator-(Type scalar) const
{
return Matrix31::operator-(scalar);
}
inline Vector3 operator-() const inline Vector3 operator-() const
{ {
return Matrix31::operator-(); return Matrix31::operator-();