kaycxx-assert
C++ assertion library
Loading...
Searching...
No Matches
assert_not_close

Asserts that two numeric values are not equal after rounding to a decimal precision.

The default precision is 2 decimal digits. Integral values are compared exactly. Boolean values are rejected because closeness is a numeric relation, not a truth-value relation.

using namespace kaycxx::assert;
int main() {
assert_not_close(1.23, 1.24);
assert_not_close(3.14159, 3.15, 3);
}
Includes the complete public assertion API.
Assertion functions and related types.
Definition assert.hpp:15

Use this when rounded equality would indicate an unwanted result.