Fix random seed value
This commit is contained in:
parent
443399bd7a
commit
92d58a58ef
1 changed files with 2 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue