ResInsight/ApplicationLibCode/Application/Tools/RiaCurveMerger.cpp
2021-04-06 21:04:31 +02:00

20 lines
611 B
C++

#include "RiaCurveMerger.h"
#include <algorithm>
#include <ctime>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
template <>
bool XValueComparator<double>::equals( const double& lhs, const double& rhs )
{
double eps = 1.0e-12 * std::max( std::fabs( lhs ), std::fabs( rhs ) );
return std::fabs( lhs - rhs ) < eps;
}
template <>
double XValueComparator<time_t>::diff( const time_t& lhs, const time_t& rhs )
{
return difftime( lhs, rhs );
}