Commit 95c47070 authored by Martin Marinov's avatar Martin Marinov

Remove the obsolete VSTools.hh

parent 17b75558
......@@ -22,7 +22,6 @@
#include <cmath>
#include <climits>
#include <CoMISo/Utils/VSToolsT.hh>
#include <CoMISo/Utils/gmm.hh>
#include <CoMISo/Config/CoMISoDefines.hh>
......
......@@ -40,9 +40,8 @@
//== INCLUDES =================================================================
#include "Eigen_Tools.hh"
#include <queue>
#include <CoMISo/Utils/VSToolsT.hh>
#include <gmm/gmm.h>
#include <queue>
//== NAMESPACES ===============================================================
......
......@@ -37,10 +37,9 @@
#include "GMM_Tools.hh"
#define GMM_USES_LAPACK
#include <gmm/gmm_lapack_interface.h>
#include <CoMISo/Utils/VSToolsT.hh>
#include <Base/Debug/DebOut.hh>
#include <gmm/gmm_lapack_interface.h>
#include <queue>
//== NAMESPACES ===============================================================
......
......@@ -5,7 +5,6 @@ set(my_headers
${CMAKE_CURRENT_SOURCE_DIR}/MutablePriorityQueueT.hh
${CMAKE_CURRENT_SOURCE_DIR}/SmartPointer.hh
${CMAKE_CURRENT_SOURCE_DIR}/Tools.hh
${CMAKE_CURRENT_SOURCE_DIR}/VSToolsT.hh
PARENT_SCOPE
)
......
......@@ -30,16 +30,21 @@
inline int int_round(const double _x)
{
return int(_x >= 0.0 ? _x + 0.5 : _x - 0.5);
return int(_x < 0 ? _x - 0.5 : _x + 0.5);
}
inline double round(double _x)
{
return _x < 0 ? int(_x - 0.5) : int(_x + 0.5);
}
inline bool same(const double _x, const double _y, const double _tol)
{
return fabs(_x - _y) < _tol;
}
template <typename T> inline T sqr(const T& _a) { return _a * _a; }
//=============================================================================
#endif // TOOLS_HH defined
//=============================================================================
/*===========================================================================*\
* *
* CoMISo *
* Copyright (C) 2008-2009 by Computer Graphics Group, RWTH Aachen *
* www.rwth-graphics.de *
* *
*---------------------------------------------------------------------------*
* This file is part of CoMISo. *
* *
* CoMISo is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* CoMISo is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with CoMISo. If not, see <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
#ifndef VSTOOLS_HH
#define VSTOOLS_HH
//== FORWARDDECLARATIONS ======================================================
//== NAMESPACES ===============================================================
//== DEFINITION =========================================================
/** These functions are required for Visual Studio to work around missing
functions. Basic equivalent functions for double exist in the float
header but are named different. So this wrapper makes them standard compatible.
*/
#ifdef WIN32
#include <math.h>
#include <float.h>
namespace std {
inline int isnan(double x)
{
return _isnan(x);
}
// Which idiot defines isinf as a macro somewhere?
#ifdef isinf
#undef isinf
#endif
inline int isinf(double x)
{
return !_finite(x);
}
inline int isfinite(double x)
{
return _finite(x);
}
}// namespace std
inline double nearbyint(double x)
{
if( x >= 0.0 )
return int( x + 0.5 );
else
return int( x - 0.5 );
}
inline double round ( double _value )
{
return nearbyint(_value);
}
#endif //WIN32
//=============================================================================
#endif // VSTOOLS_HH defined
//=============================================================================
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment