Commit 0ba49469 authored by Peter Eastman's avatar Peter Eastman
Browse files

Implemented == and != operators for Vec3

parent b7119534
...@@ -67,6 +67,14 @@ public: ...@@ -67,6 +67,14 @@ public:
return data[index]; return data[index];
} }
bool operator==(const Vec3& rhs) const {
return (data[0] == rhs[0] && data[1] == rhs[1] && data[2] == rhs[2]);
}
bool operator!=(const Vec3& rhs) const {
return (data[0] != rhs[0] || data[1] != rhs[1] || data[2] != rhs[2]);
}
// Arithmetic operators // Arithmetic operators
// unary plus // unary plus
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment