normalize prec, flux and river width

This commit is contained in:
Azgaar 2021-12-30 18:49:36 +03:00
parent f08b77bd6a
commit 604dcfacf6
6 changed files with 76 additions and 16 deletions

View file

@ -979,7 +979,10 @@ function generatePrecipitation() {
prec.selectAll("*").remove();
const {cells, cellsX, cellsY} = grid;
cells.prec = new Uint8Array(cells.i.length); // precipitation array
const modifier = precInput.value / 100; // user's input
const cellsNumberModifier = (pointsInput.dataset.cells / 10000) ** 0.25;
const precInputModifier = precInput.value / 100;
const modifier = cellsNumberModifier * precInputModifier;
const westerly = [];
const easterly = [];