From 26ea606a09dfefaa8c3689bfc65ceb4fc4ff1b6f Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 9 Feb 2018 20:25:31 -1000 Subject: [PATCH] Add `double` version of close_enough --- include/zeus/Math.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/zeus/Math.hpp b/include/zeus/Math.hpp index 5b954fb..cc355bd 100644 --- a/include/zeus/Math.hpp +++ b/include/zeus/Math.hpp @@ -162,6 +162,11 @@ inline bool close_enough(float a, float b, double epsilon = 0.000009999999747378 { return std::fabs(a - b) < epsilon; } + +inline bool close_enough(double a, double b, double epsilon = 0.000009999999747378752) +{ + return std::fabs(a - b) < epsilon; +} } #endif // MATH_HPP