SGVec2.hxx SGVec3.hxx SGVec4.hxx: Add inf norm function
norm1(const SGVec2<T>& v)
{ return fabs(v(0)) + fabs(v(1)); }
+/// The inf-norm of the vector
+template<typename T>
+inline
+T
+normI(const SGVec2<T>& v)
+{ return SGMisc<T>::max(fabs(v(0)), fabs(v(1))); }
+
/// The euclidean norm of the vector, that is what most people call length
template<typename T>
inline
norm1(const SGVec3<T>& v)
{ return fabs(v(0)) + fabs(v(1)) + fabs(v(2)); }
+/// The inf-norm of the vector
+template<typename T>
+inline
+T
+normI(const SGVec3<T>& v)
+{ return SGMisc<T>::max(fabs(v(0)), fabs(v(1)), fabs(v(2))); }
+
/// Vector cross product
template<typename T>
inline
norm1(const SGVec4<T>& v)
{ return fabs(v(0)) + fabs(v(1)) + fabs(v(2)) + fabs(v(3)); }
+/// The inf-norm of the vector
+template<typename T>
+inline
+T
+normI(const SGVec4<T>& v)
+{ return SGMisc<T>::max(fabs(v(0)), fabs(v(1)), fabs(v(2)), fabs(v(2))); }
+
/// The euclidean norm of the vector, that is what most people call length
template<typename T>
inline