This commit is contained in:
Applevangelist
2026-03-27 15:10:23 +01:00
parent 0806d822ff
commit 84e20dae29
8 changed files with 4697 additions and 11 deletions
+1 -1
View File
@@ -4262,7 +4262,7 @@ end
-- @return #number Random number between 0 and 1.
function UTILS.LCGRandom()
if UTILS.lcg == nil then
UTILS.LCGRandomSeed()
UTILS.LCGRandomSeed(timer.getTime())
end
UTILS.lcg.seed = (UTILS.lcg.a * UTILS.lcg.seed + UTILS.lcg.c) % UTILS.lcg.m
return UTILS.lcg.seed / UTILS.lcg.m