From 7223f84d1ceb7f892937943241e8c41efb4efa0a Mon Sep 17 00:00:00 2001 From: Marcel Greter Date: Fri, 14 Dec 2018 01:30:10 +0100 Subject: [PATCH] Fix number comparison for floats/doubles by calculations --- src/ast.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ast.hpp b/src/ast.hpp index 6718296c8d..fb58d7f0ea 100644 --- a/src/ast.hpp +++ b/src/ast.hpp @@ -38,7 +38,7 @@ namespace Sass { // ToDo: should this really be hardcoded // Note: most methods follow precision option - const double NUMBER_EPSILON = 0.00000000000001; + const double NUMBER_EPSILON = 1e-12; // macro to test if numbers are equal within a small error margin #define NEAR_EQUAL(lhs, rhs) std::fabs(lhs - rhs) < NUMBER_EPSILON