diff --git a/MathLib/MathTools.cpp b/MathLib/MathTools.cpp index d4022d31a9598917db6c37ffa9ced895326914fc..f4daba5617a93179fddc10e3de63a49c90f54f57 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 2eac49edc628f3f9f29b0eb1d4f07edfc2e48b10..a0be00baf7beaeaa52b863b9d265423070204c52 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);