Skip to content

Commit dfc5cf8

Browse files
authored
Merge pull request #50 from JoeyDelp/testing
Testing
2 parents 5a2fa8a + 273fd62 commit dfc5cf8

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

include/JoSIM/Misc.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ namespace JoSIM {
1919
namespace Misc {
2020
double string_constant(const std::string& s);
2121

22-
// bool isclose(double a, double b, double rtol = 1E-5,
23-
// double atol = 1E-8, bool equal_nan = false);
2422
bool isclose(const double &a, const double& b);
2523

2624
std::string file_from_path(const std::string& path);

src/Misc.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <cmath>
1010
#include <cctype>
1111
#include <random>
12+
#include <cfloat>
1213

1314
using namespace JoSIM;
1415

@@ -25,16 +26,8 @@ double Misc::string_constant(const std::string& s) {
2526
return 0.0;
2627
}
2728

28-
// bool Misc::isclose(double a, double b, double rtol, double atol,
29-
// bool equal_nan) {
30-
// double diff = std::abs(a - b);
31-
// double comp = (rtol + atol * abs(b));
32-
// bool result = diff <= comp;
33-
// return result;
34-
// }
35-
3629
bool Misc::isclose(const double &a, const double &b) {
37-
return fabs(a - b) < __DBL_EPSILON__;
30+
return fabs(a - b) < DBL_EPSILON;
3831
}
3932

4033
std::string Misc::file_from_path(const std::string& path) {

0 commit comments

Comments
 (0)