MCPcopy
hub / github.com/lovell/sharp / isInAcceptableRange

Function isInAcceptableRange

test/unit/stats.js:14–16  ·  view source on GitHub ↗
(actual, expected)

Source from the content-addressed store, hash-verified

12// Test Helpers
13const threshold = 0.001;
14function isInAcceptableRange (actual, expected) {
15 return actual >= ((1 - threshold) * expected) && actual <= ((1 + threshold) * expected);
16}
17function isInRange (actual, min, max) {
18 return actual >= min && actual <= max;
19}

Callers 1

stats.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…