MCPcopy Create free account
hub / github.com/d3/d3-shape / inDeltaObject

Function inDeltaObject

test/asserts.js:36–40  ·  view source on GitHub ↗
(actual, expected, delta)

Source from the content-addressed store, hash-verified

34}
35
36function inDeltaObject(actual, expected, delta) {
37 for (let i in expected) if (!inDelta(actual[i], expected[i], delta)) return false;
38 for (let i in actual) if (!(i in expected)) return false;
39 return true;
40}
41
42function inDeltaNumber(actual, expected, delta) {
43 return actual >= expected - delta && actual <= expected + delta;

Callers

nothing calls this directly

Calls 1

inDeltaFunction · 0.85

Tested by

no test coverage detected