From b25e4c1f2e0f15d1fced93f21dc3a5f8a1af20d6 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Wed, 21 Jan 2015 11:53:55 +0100 Subject: [PATCH] [MaL] Rename MathPoint -> Point3d. --- MathLib/MathPoint.cpp | 8 ++++---- MathLib/MathPoint.h | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/MathLib/MathPoint.cpp b/MathLib/MathPoint.cpp index 261cc818326..dd2b543e505 100644 --- a/MathLib/MathPoint.cpp +++ b/MathLib/MathPoint.cpp @@ -1,7 +1,7 @@ /** * \file * \date 2015-01-16 - * \brief Implementation of the MathPoint class. + * \brief Implementation of the Point3d class. * * \copyright * Copyright (c) 2012-2015, OpenGeoSys Community (http://www.opengeosys.org) @@ -13,9 +13,9 @@ #include <cmath> -#include "MathPoint.h" +#include "Point3d.h" -bool operator<= (const MathLib::MathPoint& p0, const MathLib::MathPoint& p1) +bool operator<= (const MathLib::Point3d& p0, const MathLib::Point3d& p1) { if (p0[0] > p1[0]) { return false; @@ -42,7 +42,7 @@ bool operator<= (const MathLib::MathPoint& p0, const MathLib::MathPoint& p1) } } -bool lessEq(const MathLib::MathPoint& p0, const MathLib::MathPoint& p1, double tol) +bool lessEq(const MathLib::Point3d& p0, const MathLib::Point3d& p1, double tol) { // test a relative and an absolute criterion if (fabs(p0[0]-p1[0]) > tol * std::min(fabs(p1[0]), fabs(p0[0])) && fabs(p0[0]-p1[0]) > tol) { diff --git a/MathLib/MathPoint.h b/MathLib/MathPoint.h index 6728ebc7b6f..51d5e67ca8c 100644 --- a/MathLib/MathPoint.h +++ b/MathLib/MathPoint.h @@ -1,7 +1,7 @@ /** * \file * \date 2015-01-16 - * \brief Definition of the MathPoint class. + * \brief Definition of the Point3d class. * * \copyright * Copyright (c) 2012-2015, OpenGeoSys Community (http://www.opengeosys.org) @@ -11,8 +11,8 @@ * */ -#ifndef MATHPOINT_H_ -#define MATHPOINT_H_ +#ifndef POINT3D_H_ +#define POINT3D_H_ #include <limits> @@ -20,25 +20,25 @@ namespace MathLib { -typedef MathLib::TemplatePoint<double,3> MathPoint; +typedef MathLib::TemplatePoint<double,3> Point3d; } // end namespace MathLib /** * lexicographic comparison of points */ -bool operator<= (MathLib::MathPoint const & p0, MathLib::MathPoint const & p1); +bool operator<= (MathLib::Point3d const & p0, MathLib::Point3d const & p1); /** * lexicographical comparison of points taking an epsilon into account - * @param p0 first input MathPoint - * @param p1 second input MathPoint + * @param p0 first input Point3d + * @param p1 second input Point3d * @param tol tolerance (if in the comparison operation the property fabs(p0[k] - p1[k]) < tol * holds for the k-th coordinate the points are assumed the be equal in this coordinate) * @return true, if p0 is lexicographically smaller than p1 */ -bool lessEq(const MathLib::MathPoint& p0, - const MathLib::MathPoint& p1, +bool lessEq(const MathLib::Point3d& p0, + const MathLib::Point3d& p1, double tol = std::numeric_limits<double>::epsilon()); -#endif /* MATHPOINT_H_ */ +#endif /* POINT3D_H_ */ -- GitLab