From 03736176fcc30e5aa9c2828a18e610db307ba8c0 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 18 Feb 2018 14:47:53 -0500 Subject: [PATCH] Distribution was bugged and gave high values --- recursive-macro.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recursive-macro.js b/recursive-macro.js index ef625c7..d93b9f3 100644 --- a/recursive-macro.js +++ b/recursive-macro.js @@ -144,7 +144,7 @@ function merge_desc(list) { function distribution(min, max, samples) { var result = 0; - var limit = Math.min(100,max) + var limit = Math.min(100,samples) for (var i = 0; i < limit; i++) { result += Math.floor(Math.random() * (max - min + 1) + min); }