diff options
Diffstat (limited to 'Vector.h')
-rw-r--r-- | Vector.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -12,6 +12,14 @@ class Vector : public Vertex { return Vector(x+v.x, y+v.y, z+v.z); } + Vector& operator+=(const Vector &v) { + x += v.x; + y += v.y; + z += v.z; + + return *this; + } + Vector operator*(float f) const { return Vector(x*f, y*f, z*f); } |