This commit is contained in:
Azgaar 2019-11-17 23:01:08 +03:00
parent 0b1c93b45d
commit f5985a4374
2 changed files with 6 additions and 6 deletions

View file

@ -515,11 +515,11 @@
}
}
const smooth = function(fr = 2) {
const smooth = function(fr = 2, add = 0) {
cells.h = cells.h.map((h, i) => {
const a = [h];
cells.c[i].forEach(c => a.push(cells.h[c]));
return lim((h * (fr-1) + d3.mean(a)) / fr);
return lim((h * (fr-1) + d3.mean(a) + add) / fr);
});
}