]> git.tdb.fi Git - libs/math.git/blobdiff - source/linal/vector.h
Another big batch of stuff
[libs/math.git] / source / linal / vector.h
index 933611eca6d63096f22b3ce9375c8b09a04f1d3e..1a79bd8dc5a58513aff6b7881a739e34a858f1a0 100644 (file)
@@ -141,6 +141,15 @@ inline Vector<T, N> operator-(const Vector<T, N> &v)
        return r;
 }
 
+template<typename T, unsigned N>
+inline bool operator==(const Vector<T, N> &v, const Vector<T, N> &w)
+{
+       for(unsigned i=0; i<N; ++i)
+               if(v[i]!=w[i])
+                       return false;
+       return true;
+}
+
 template<typename T, unsigned N>
 inline T inner_product(const Vector<T, N> &v1, const Vector<T, N> &v2)
 {