X-Git-Url: http://git.scottworley.com/inverse-tax/blobdiff_plain/9737900ee57988ffb64fea66f4c6e4245d51ad9a..1c6e40691d86539d80018aa8fc495272b900c4c4:/tax.js?ds=sidebyside diff --git a/tax.js b/tax.js index 0d94200..d26db5f 100644 --- a/tax.js +++ b/tax.js @@ -49,6 +49,8 @@ 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: