Skip to content

Commit 7223f84

Browse files
committed
Fix number comparison for floats/doubles by calculations
1 parent 83e8513 commit 7223f84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ast.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace Sass {
3838

3939
// ToDo: should this really be hardcoded
4040
// Note: most methods follow precision option
41-
const double NUMBER_EPSILON = 0.00000000000001;
41+
const double NUMBER_EPSILON = 1e-12;
4242

4343
// macro to test if numbers are equal within a small error margin
4444
#define NEAR_EQUAL(lhs, rhs) std::fabs(lhs - rhs) < NUMBER_EPSILON

0 commit comments

Comments
 (0)