Fix random seed value

This commit is contained in:
posidron 2018-08-28 00:54:24 +02:00
parent 443399bd7a
commit 92d58a58ef
No known key found for this signature in database
GPG Key ID: 799CE5B68FEF404A
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,8 @@ class random {
static init (seed) {
if (seed === null || seed === undefined) {
random.seed = new Date().getTime()
} else {
random.seed = seed
}
random.twister = new MersenneTwister()