From: Scott Worley Date: Thu, 23 May 2019 08:46:12 +0000 (-0700) Subject: Nevermind about near X-Git-Tag: v1.0~20 X-Git-Url: http://git.scottworley.com/inverse-tax/commitdiff_plain/5789fd4b97bc2bb94caa7b6ae288f649f432bdc3?hp=9d36e0c2b4cc8229b588b751a04e8119f54034b7 Nevermind about near --- diff --git a/tax.test.js b/tax.test.js index 192eac0..6fcc15c 100644 --- a/tax.test.js +++ b/tax.test.js @@ -6,10 +6,6 @@ function test(description, f) { f(); } -function near(a, b, epsilon = 1e-6) { - return Math.abs(a - b) < epsilon; -} - test("parse tax table", () => { const parsed = parse_tax_table(' 1 2\n10 4\n'); assert.strictEqual(parsed.length, 2); @@ -25,5 +21,4 @@ test("sum", () => { test("tax", () => { assert.strictEqual(tax([[10, 100, .01], [100, Infinity, .1]], 150), 5.9); - assert.ok(near(tax([[10, 100, .01], [100, Infinity, .1]], 150), 5.9)); });