]> git.mxchange.org Git - simgear.git/blobdiff - simgear/math/SGVec2.hxx
Modified Files:
[simgear.git] / simgear / math / SGVec2.hxx
index 6205e12618c3a564500d9dae815a01104a75c2f2..3153875857238cc5ce1062259c30ef93da131a42 100644 (file)
@@ -267,6 +267,13 @@ T
 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