MCPcopy Create free account
hub / github.com/RenderKit/embree / match

Method match

tutorials/external/catch.hpp:9390–9392  ·  view source on GitHub ↗

Performs equivalent check of std::fabs(lhs - rhs) <= margin But without the subtraction to allow for INFINITY in comparison

Source from the content-addressed store, hash-verified

9388 // Performs equivalent check of std::fabs(lhs - rhs) <= margin
9389 // But without the subtraction to allow for INFINITY in comparison
9390 bool WithinAbsMatcher::match(double const& matchee) const {
9391 return (matchee + m_margin >= m_target) && (m_target + m_margin >= matchee);
9392 }
9393
9394 std::string WithinAbsMatcher::describe() const {
9395 return "is within " + ::Catch::Detail::stringify(m_margin) + " of " + ::Catch::Detail::stringify(m_target);

Callers 4

matchMethod · 0.45
matchMethod · 0.45
matchMethod · 0.45
MatchExprMethod · 0.45

Calls 5

regex_matchFunction · 0.85
adjustStringMethod · 0.80
containsFunction · 0.70
startsWithFunction · 0.70
endsWithFunction · 0.70

Tested by

no test coverage detected