| 5720 | } |
| 5721 | |
| 5722 | bool Approx::equalityComparisonImpl(const double other) const { |
| 5723 | // First try with fixed margin, then compute margin based on epsilon, scale and Approx's value |
| 5724 | // Thanks to Richard Harris for his help refining the scaled margin value |
| 5725 | return marginComparison(m_value, other, m_margin) || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(m_value))); |
| 5726 | } |
| 5727 | |
| 5728 | void Approx::setMargin(double margin) { |
| 5729 | CATCH_ENFORCE(margin >= 0, |
no test coverage detected