MCPcopy Create free account
hub / github.com/denoland/std / f

Function f

assert/almost_equals.ts:51–51  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

49
50 const msgSuffix = msg ? `: ${msg}` : ".";
51 const f = (n: number) => Number.isInteger(n) ? n : n.toExponential();
52 throw new AssertionError(
53 `Expected actual: "${f(actual)}" to be close to "${f(expected)}": \
54delta "${f(delta)}" is greater than "${f(tolerance)}"${msgSuffix}`,

Callers 1

assertAlmostEqualsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected