Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Fix number comparison for floats/doubles by calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed Dec 14, 2018
1 parent 83e8513 commit 7223f84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7223f84

Please sign in to comment.