do less work when not drawing

This commit is contained in:
Felix Roos 2023-01-15 23:11:49 +01:00
parent 800989419b
commit 5aa983b45b
5 changed files with 283 additions and 282 deletions

View file

@ -46,7 +46,7 @@ const _bjork = function (n, x) {
return Math.min(ons, offs) <= 1 ? [n, x] : _bjork(...(ons > offs ? left(n, x) : right(n, x)));
};
const bjork = function (ons, steps) {
export const bjork = function (ons, steps) {
const offs = steps - ons;
const x = Array(ons).fill([1]);
const y = Array(offs).fill([0]);