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

Implemented == and != operators for Vec3

parent b7119534
......@@ -66,6 +66,14 @@ public:
assert(index >= 0 && index < 3);
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
......
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