Skip to content

Commit

Permalink
Fix header (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraj-Yadav authored Nov 16, 2024
1 parent 0d84f61 commit 9ef5e16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fuzzy.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#include "fuzzy.hpp"

#include <algorithm>
#include <cmath>

namespace fuzzy {
const double epsilon = 0.000001;

double delta(double a, double b) {
return std::max(std::max(std::abs(a), std::abs(b)), epsilon) * 0.01;
return std::max({std::abs(a), std::abs(b), epsilon}) * 0.01;
}

bool less(double a, double b) { return a < (b - delta(a, b)); }
Expand Down

0 comments on commit 9ef5e16

Please sign in to comment.