From 6a64c36e013a203082fb2004af0bce3401a71f8f Mon Sep 17 00:00:00 2001 From: lisyarus Date: Fri, 25 Sep 2020 17:20:14 +0300 Subject: [PATCH] Fix uniform int distribution --- libs/pcg/include/psemek/pcg/random/uniform_int.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/pcg/include/psemek/pcg/random/uniform_int.hpp b/libs/pcg/include/psemek/pcg/random/uniform_int.hpp index b7c95393..d4d65d9c 100644 --- a/libs/pcg/include/psemek/pcg/random/uniform_int.hpp +++ b/libs/pcg/include/psemek/pcg/random/uniform_int.hpp @@ -67,7 +67,7 @@ namespace psemek::pcg { ctype const gen_range_full = gen_range + 1; ctype const buckets = rng_range / gen_range_full; - ctype const max = gen_range * buckets; + ctype const max = gen_range_full * buckets; do {