mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
river type - fix fork type selection
This commit is contained in:
parent
27d460ce2f
commit
50f497c62a
5 changed files with 58 additions and 34 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue