MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / marginComparison

Function marginComparison

extern/Catch2/catch.hpp:7867–7869  ·  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

7865// Performs equivalent check of std::fabs(lhs - rhs) <= margin
7866// But without the subtraction to allow for INFINITY in comparison
7867bool marginComparison(double lhs, double rhs, double margin) {
7868 return (lhs + margin >= rhs) && (rhs + margin >= lhs);
7869}
7870
7871}
7872

Callers 2

matchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected