Browse Source

Increase then number of random samples per victim type to 1000

tags/v1.1.2
Fen Dweller 5 years ago
parent
commit
00cb638a72
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      recursive-macro.js

+ 4
- 2
recursive-macro.js View File

@@ -392,7 +392,7 @@ function fill_area(area, weights, variance=0.15)
continue; continue;


var max = Math.floor(area / candidate.area); var max = Math.floor(area / candidate.area);
var limit = Math.min(max, 100);
var limit = Math.min(max, 1000);


var count = 0; var count = 0;
var loopvar = 0; var loopvar = 0;
@@ -418,8 +418,10 @@ function fill_area(area, weights, variance=0.15)
++loopvar; ++loopvar;
} }


// if we're doing more than 100 victims, then we randomly

if (limit < max) { if (limit < max) {
count += Math.round((max-limit) * candidate.weight);
count += Math.round((max/limit) * candidate.weight);
} }


area -= count * candidate.area; area -= count * candidate.area;


Loading…
Cancel
Save