MCPcopy Create free account
hub / github.com/Tencent/MMKV / EqualWithAccuracy

Function EqualWithAccuracy

POSIX/demo/UnitTest.cpp:117–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115
116template <typename T>
117bool EqualWithAccuracy(T value1, T value2, T accuracy) {
118 return fabs(value1 - value2) <= accuracy;
119}
120
121void testFloat(MMKV *mmkv) {
122 auto ret = mmkv->set(numeric_limits<float>::max(), "float");

Callers 3

testFloatFunction · 0.85
testDoubleFunction · 0.85
testRemoveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected