From c548054e6edc6ed8a28e1e68b68465f045e7df14 Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Fri, 22 Feb 2013 15:24:35 +0100
Subject: [PATCH] Removed unused function sqrNrm2 from MathTools.{h,cpp}.

---
 MathLib/MathTools.cpp |  9 ++-------
 MathLib/MathTools.h   | 11 ++++-------
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/MathLib/MathTools.cpp b/MathLib/MathTools.cpp
index d4022d31a95..f4daba5617a 100644
--- a/MathLib/MathTools.cpp
+++ b/MathLib/MathTools.cpp
@@ -14,8 +14,8 @@
 
 #include "MathTools.h"
 
-namespace MathLib {
-
+namespace MathLib
+{
 void crossProd(const double u[3], const double v[3], double r[3])
 {
 	r[0] = u[1] * v[2] - u[2] * v[1];
@@ -41,11 +41,6 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3],
 	return sqrt (sqrDist (p, proj_pnt));
 }
 
-double sqrNrm2 (const GeoLib::Point* p0)
-{
-	return scpr<double,3> (p0->getCoords(), p0->getCoords());
-}
-
 double sqrDist (const GeoLib::Point* p0, const GeoLib::Point* p1)
 {
 	const double v[3] = {(*p1)[0] - (*p0)[0], (*p1)[1] - (*p0)[1], (*p1)[2] - (*p0)[2]};
diff --git a/MathLib/MathTools.h b/MathLib/MathTools.h
index 2eac49edc62..a0be00baf7b 100644
--- a/MathLib/MathTools.h
+++ b/MathLib/MathTools.h
@@ -15,9 +15,9 @@
 #ifndef MATHTOOLS_H_
 #define MATHTOOLS_H_
 
-#include <vector>
 #include <cmath>
 #include <limits>
+#include <vector>
 
 #ifdef _OPENMP
 #include <omp.h>
@@ -25,8 +25,8 @@
 
 #include "Point.h"
 
-namespace MathLib {
-
+namespace MathLib
+{
 /**
  * standard inner product in R^N
  * \param v0 array of type T representing the vector
@@ -35,7 +35,7 @@ namespace MathLib {
 template<typename T, int N> inline
 T scpr(T const * const v0, T const * const v1)
 {
-	T res (v0[0]*v1[0]);
+	T res (v0[0] * v1[0]);
 #ifdef _OPENMP
 	OPENMP_LOOP_TYPE k;
 
@@ -110,9 +110,6 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3],
  */
 bool checkDistance(GeoLib::Point const &p0, GeoLib::Point const &p1, double squaredDistance);
 
-/** squared euklid norm of the vector p0 */
-double sqrNrm2(const GeoLib::Point* const p0);
-
 /** squared dist between GeoLib::Points p0 and p1 */
 double sqrDist(const GeoLib::Point* p0, const GeoLib::Point* p1);
 
-- 
GitLab