From f31dc1253e86f3ef3e9ebe3ac5547cc49d2b3129 Mon Sep 17 00:00:00 2001 From: Craig Hutchinson Date: Thu, 3 Dec 2015 14:35:43 +0000 Subject: [PATCH] Added std:: namespace for fabs() --- include/internal/catch_approx.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/internal/catch_approx.hpp b/include/internal/catch_approx.hpp index f5dba61a..f5eacbd0 100644 --- a/include/internal/catch_approx.hpp +++ b/include/internal/catch_approx.hpp @@ -43,7 +43,7 @@ namespace Detail { friend bool operator == ( double lhs, Approx const& rhs ) { // Thanks to Richard Harris for his help refining this formula - return fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs), fabs(rhs.m_value) ) ); + return std::fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( std::fabs(lhs), std::fabs(rhs.m_value) ) ); } friend bool operator == ( Approx const& lhs, double rhs ) {