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

Function marginComparison

tutorials/external/catch.hpp:5950–5952  ·  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

5948// Performs equivalent check of std::fabs(lhs - rhs) <= margin
5949// But without the subtraction to allow for INFINITY in comparison
5950bool marginComparison(double lhs, double rhs, double margin) {
5951 return (lhs + margin >= rhs) && (rhs + margin >= lhs);
5952}
5953
5954}
5955

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected