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

Function AlmostEqualAbs

libs/map/map_tests/chart_generator_tests.cpp:20–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18double constexpr kEpsilon = 0.00001;
19
20bool AlmostEqualAbs(vector<double> const & v1, vector<double> const & v2)
21{
22 if (v1.size() != v2.size())
23 return false;
24
25 for (size_t i = 0; i < v1.size(); ++i)
26 if (!::AlmostEqualAbs(v1[i], v2[i], kEpsilon))
27 return false;
28 return true;
29}
30
31bool IsColor(vector<uint8_t> const & frameBuffer, size_t startColorIdx, uint8_t expectedR, uint8_t expectedG,
32 uint8_t expectedB, uint8_t expectedA)

Callers 9

TestGpsInfoFunction · 0.70
UNIT_TESTFunction · 0.70
CheckBookmarksFunction · 0.70
EqualBookmarksFunction · 0.70
CreateDrapeSubrouteFunction · 0.50
SaveRouteMethod · 0.50
NormalizeChartDataFunction · 0.50

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected