X-Git-Url: http://git.scottworley.com/inverse-tax/blobdiff_plain/82b7a49862ffba0bcd9e6b5500b4ed2e901444e8..49188cbe174f6f0559037bb2f6e51300dac90a85:/tax.js?ds=inline diff --git a/tax.js b/tax.js index 7f32f74..d9bd34c 100644 --- a/tax.js +++ b/tax.js @@ -53,8 +53,6 @@ function merge_tax_tables(t1, t2) { } function invert(table) { - if (table.length == 0) return x => x; - // Here we solve // net = m * gross + b // for gross: @@ -90,5 +88,6 @@ function invert(table) { return (net - b) / m; } } + return net; }; }