Skip to content
Snippets Groups Projects
Commit c548054e authored by Tom Fischer's avatar Tom Fischer
Browse files

Removed unused function sqrNrm2 from MathTools.{h,cpp}.

parent a15965cd
No related branches found
No related tags found
No related merge requests found
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#include "MathTools.h" #include "MathTools.h"
namespace MathLib { namespace MathLib
{
void crossProd(const double u[3], const double v[3], double r[3]) void crossProd(const double u[3], const double v[3], double r[3])
{ {
r[0] = u[1] * v[2] - u[2] * v[1]; r[0] = u[1] * v[2] - u[2] * v[1];
...@@ -41,11 +41,6 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3], ...@@ -41,11 +41,6 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3],
return sqrt (sqrDist (p, proj_pnt)); 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) 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]}; const double v[3] = {(*p1)[0] - (*p0)[0], (*p1)[1] - (*p0)[1], (*p1)[2] - (*p0)[2]};
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
#ifndef MATHTOOLS_H_ #ifndef MATHTOOLS_H_
#define MATHTOOLS_H_ #define MATHTOOLS_H_
#include <vector>
#include <cmath> #include <cmath>
#include <limits> #include <limits>
#include <vector>
#ifdef _OPENMP #ifdef _OPENMP
#include <omp.h> #include <omp.h>
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#include "Point.h" #include "Point.h"
namespace MathLib { namespace MathLib
{
/** /**
* standard inner product in R^N * standard inner product in R^N
* \param v0 array of type T representing the vector * \param v0 array of type T representing the vector
...@@ -35,7 +35,7 @@ namespace MathLib { ...@@ -35,7 +35,7 @@ namespace MathLib {
template<typename T, int N> inline template<typename T, int N> inline
T scpr(T const * const v0, T const * const v1) T scpr(T const * const v0, T const * const v1)
{ {
T res (v0[0]*v1[0]); T res (v0[0] * v1[0]);
#ifdef _OPENMP #ifdef _OPENMP
OPENMP_LOOP_TYPE k; OPENMP_LOOP_TYPE k;
...@@ -110,9 +110,6 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3], ...@@ -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); 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 */ /** squared dist between GeoLib::Points p0 and p1 */
double sqrDist(const GeoLib::Point* p0, const GeoLib::Point* p1); double sqrDist(const GeoLib::Point* p0, const GeoLib::Point* p1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment