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

Function marginComparison

extlibs/catch/include/catch/catch.hpp:7551–7553  ·  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

7549// Performs equivalent check of std::fabs(lhs - rhs) <= margin
7550// But without the subtraction to allow for INFINITY in comparison
7551bool marginComparison(double lhs, double rhs, double margin) {
7552 return (lhs + margin >= rhs) && (rhs + margin >= lhs);
7553}
7554
7555}
7556

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected