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

Function marginComparison

tests/catch.hpp:5690–5692  ·  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

5688// Performs equivalent check of std::fabs(lhs - rhs) <= margin
5689// But without the subtraction to allow for INFINITY in comparison
5690bool marginComparison(double lhs, double rhs, double margin) {
5691 return (lhs + margin >= rhs) && (rhs + margin >= lhs);
5692}
5693
5694}
5695

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected