From 00cb638a72af4d41942137b90a1e65bedca7b6c1 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 22 Dec 2019 09:16:07 -0500 Subject: [PATCH] Increase then number of random samples per victim type to 1000 --- recursive-macro.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recursive-macro.js b/recursive-macro.js index 1cf1259..d077a40 100644 --- a/recursive-macro.js +++ b/recursive-macro.js @@ -392,7 +392,7 @@ function fill_area(area, weights, variance=0.15) continue; var max = Math.floor(area / candidate.area); - var limit = Math.min(max, 100); + var limit = Math.min(max, 1000); var count = 0; var loopvar = 0; @@ -418,8 +418,10 @@ function fill_area(area, weights, variance=0.15) ++loopvar; } + // if we're doing more than 100 victims, then we randomly + if (limit < max) { - count += Math.round((max-limit) * candidate.weight); + count += Math.round((max/limit) * candidate.weight); } area -= count * candidate.area;