feat: Allow reconfiguration of an existing picomath instance

Keeps track of which operations depend on the configuration and
  invalidates them for lazy reconfiguration when the config changes.
This commit is contained in:
Glen Whitney 2022-03-25 14:40:57 -07:00
parent 4213ade4ba
commit d95e5ad930
3 changed files with 44 additions and 17 deletions

View file

@ -13,6 +13,7 @@ export default function create(pmath) {
}
if (resolve && Math.abs(sum.im/sum.re) < 1e-10) return sum.re
return sum
}])
}],
create, pmath) // register ourselves for invalidation and reconfiguration
}