mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-10 08:03:05 -06:00
20 lines
611 B
C++
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 );
|
|
} |