From a3ae70db118828f7996bab07e05d18d619dd2c41 Mon Sep 17 00:00:00 2001 From: adv Date: Fri, 30 Aug 2013 07:30:46 +0000 Subject: [PATCH] Tools class for HYDROData. --- src/HYDROData/HYDROData.vcproj | 8 +++++++ src/HYDROData/HYDROData_Tool.cxx | 2 ++ src/HYDROData/HYDROData_Tool.h | 37 ++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 src/HYDROData/HYDROData_Tool.cxx create mode 100644 src/HYDROData/HYDROData_Tool.h diff --git a/src/HYDROData/HYDROData.vcproj b/src/HYDROData/HYDROData.vcproj index 7d2363f6..9310c556 100644 --- a/src/HYDROData/HYDROData.vcproj +++ b/src/HYDROData/HYDROData.vcproj @@ -153,6 +153,10 @@ RelativePath=".\HYDROData_Polyline.cxx" > + + @@ -210,6 +214,10 @@ RelativePath=".\HYDROData_Polyline.h" > + + diff --git a/src/HYDROData/HYDROData_Tool.cxx b/src/HYDROData/HYDROData_Tool.cxx new file mode 100644 index 00000000..9ed8f0be --- /dev/null +++ b/src/HYDROData/HYDROData_Tool.cxx @@ -0,0 +1,2 @@ + +#include "HYDROData_Tool.h" diff --git a/src/HYDROData/HYDROData_Tool.h b/src/HYDROData/HYDROData_Tool.h new file mode 100644 index 00000000..e2306013 --- /dev/null +++ b/src/HYDROData/HYDROData_Tool.h @@ -0,0 +1,37 @@ + +#ifndef HYDROData_Tool_HeaderFile +#define HYDROData_Tool_HeaderFile + +#include + + + +class HYDROData_Tool { + +public: + + +}; + +inline bool ValuesEquals( const double& theFirst, const double& theSecond ) +{ + return theFirst > ( theSecond - Precision::Confusion() ) && + theFirst < ( theSecond + Precision::Confusion() ); +} + +inline bool ValuesMoreEquals( const double& theFirst, const double& theSecond ) +{ + return theFirst >= theSecond || ValuesEquals( theFirst, theSecond ); +} + +inline bool ValuesLessEquals( const double& theFirst, const double& theSecond ) +{ + return theFirst <= theSecond || ValuesEquals( theFirst, theSecond ); +} + + + + +#endif + + -- 2.39.2