MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / equalityComparisonImpl

Method equalityComparisonImpl

extlibs/catch/include/catch/catch.hpp:7583–7587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7581 }
7582
7583 bool Approx::equalityComparisonImpl(const double other) const {
7584 // First try with fixed margin, then compute margin based on epsilon, scale and Approx's value
7585 // Thanks to Richard Harris for his help refining the scaled margin value
7586 return marginComparison(m_value, other, m_margin) || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(m_value)));
7587 }
7588
7589 void Approx::setMargin(double newMargin) {
7590 CATCH_ENFORCE(newMargin >= 0,

Callers 1

operator ==Method · 0.80

Calls 1

marginComparisonFunction · 0.85

Tested by

no test coverage detected