| 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, |
no test coverage detected