diff --git a/Base/include/VectorBase.h b/Base/include/VectorBase.h index 945e176..73023b5 100644 --- a/Base/include/VectorBase.h +++ b/Base/include/VectorBase.h @@ -74,6 +74,20 @@ namespace FasTC { return *this; } + // Equality comparison + template + bool operator==(const VectorBase<_T, N> &v) const { + bool result = true; + for(int i = 0; i < N; i++) + result = result && (vec[i] == v[i]); + return result; + } + + template + bool operator!=(const VectorBase<_T, N> &v) const { + return !(operator==(v)); + } + // Allows casting to other vector types if the underlying type system does as well... template operator VectorBase<_T, N>() const {