X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fvector.cpp;h=58228ca39f75a7cfe9bb1b834dd8f19af4d24bf0;hb=f19a3a172c425b7fcc5a648a94870f0247c6be89;hp=e9ad51f3427fa06ad918dd7793986369cacdef87;hpb=fa8da664bfb749497b1b2d2991077af0554cc369;p=architektonas diff --git a/src/vector.cpp b/src/vector.cpp index e9ad51f..58228ca 100644 --- a/src/vector.cpp +++ b/src/vector.cpp @@ -133,6 +133,24 @@ Vector& Vector::operator+=(double const v) return *this; } +// Vector - vector, self assigned + +Vector& Vector::operator-=(Vector const v) +{ + x -= v.x, y -= v.y, z -= v.z; + + return *this; +} + +// Vector - constant, self assigned + +Vector& Vector::operator-=(double const v) +{ + x -= v, y -= v, z -= v; + + return *this; +} + Vector Vector::Unit(void) {