MCPcopy Create free account
hub / github.com/comaps/comaps / AlmostEqualAbsOrRel

Function AlmostEqualAbsOrRel

libs/base/math.hpp:79–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77// Returns true if x and y are equal up to the absolute or relative difference eps.
78template <typename Float>
79bool AlmostEqualAbsOrRel(Float x, Float y, Float eps)
80{
81 return AlmostEqualAbs(x, y, eps) || AlmostEqualRel(x, y, eps);
82}
83
84namespace math
85{

Callers 4

TestFunction · 0.85
TestAlmostEqualFunction · 0.85
TestAlmostEqualFunction · 0.85

Calls 2

AlmostEqualRelFunction · 0.85
AlmostEqualAbsFunction · 0.70

Tested by 4

TestFunction · 0.68
TestAlmostEqualFunction · 0.68
TestAlmostEqualFunction · 0.68