X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fvector.cpp;h=e992bbffd53aa5496bffde85c0ff6b543f4891fd;hb=d549bfdc8c872b966b9d787c00e5e8027366093c;hp=58228ca39f75a7cfe9bb1b834dd8f19af4d24bf0;hpb=f19a3a172c425b7fcc5a648a94870f0247c6be89;p=architektonas diff --git a/src/vector.cpp b/src/vector.cpp index 58228ca..e992bbf 100644 --- a/src/vector.cpp +++ b/src/vector.cpp @@ -1,7 +1,7 @@ // // vector.cpp: Various structures used for 3 dimensional imaging // -// by James L. Hammons +// by James Hammons // (C) 2006 Underground Software // // JLH = James L. Hammons @@ -151,6 +151,17 @@ Vector& Vector::operator-=(double const v) return *this; } +// Check for equality +bool Vector::operator==(Vector const v) +{ + return (x == v.x && y == v.y && z == v.z ? true : false); +} + +// Check for inequality +bool Vector::operator!=(Vector const v) +{ + return (x != v.x || y != v.y || z != v.z ? true : false); +} Vector Vector::Unit(void) {