return equivalent(v1, v2, tol, tol);
}
+/// The euclidean distance of the two vectors
+template<typename T>
+inline
+T
+dist(const SGVec4<T>& v1, const SGVec4<T>& v2)
+{ return norm(v1 - v2); }
+
+/// The squared euclidean distance of the two vectors
+template<typename T>
+inline
+T
+distSqr(const SGVec4<T>& v1, const SGVec4<T>& v2)
+{ SGVec4<T> tmp = v1 - v2; return dot(tmp, tmp); }
+
#ifndef NDEBUG
template<typename T>
inline
operator<<(std::basic_ostream<char_type, traits_type>& s, const SGVec4<T>& v)
{ return s << "[ " << v(0) << ", " << v(1) << ", " << v(2) << ", " << v(3) << " ]"; }
-/// Two classes doing actually the same on different types
-typedef SGVec4<float> SGVec4f;
-typedef SGVec4<double> SGVec4d;
-
inline
SGVec4f
toVec4f(const SGVec4d& v)