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

Function AlmostEqualRel

libs/base/math.hpp:72–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70// The same considerations as in AlmostEqualAbs apply.
71template <typename Float>
72bool AlmostEqualRel(Float x, Float y, Float eps)
73{
74 return fabs(x - y) < eps * std::max(fabs(x), fabs(y));
75}
76
77// Returns true if x and y are equal up to the absolute or relative difference eps.
78template <typename Float>

Callers 6

UNIT_TESTFunction · 0.85
UNIT_TESTFunction · 0.85
AlmostEqualAbsOrRelFunction · 0.85
UNIT_TESTFunction · 0.85
TestRoutePointsNumberFunction · 0.85
TestRouteFunction · 0.85

Calls

no outgoing calls

Tested by 5

UNIT_TESTFunction · 0.68
UNIT_TESTFunction · 0.68
UNIT_TESTFunction · 0.68
TestRoutePointsNumberFunction · 0.68
TestRouteFunction · 0.68