river type - fix fork type selection

This commit is contained in:
Azgaar 2021-07-23 20:37:17 +03:00
parent 27d460ce2f
commit 50f497c62a
5 changed files with 58 additions and 34 deletions

View file

@ -236,6 +236,10 @@ function P(probability) {
return Math.random() < probability;
}
function each(n) {
return i => i % n === 0;
}
// random number (normal or gaussian distribution)
function gauss(expected = 100, deviation = 30, min = 0, max = 300, round = 0) {
return rn(Math.max(Math.min(d3.randomNormal(expected, deviation)(), max), min), round);