Skip to content

Commit 925db3a

Browse files
fix: improve default seed initialization (#1334)
1 parent b9884d0 commit 925db3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/modules/mersenne/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class MersenneModule {
88
private gen = new Gen();
99

1010
constructor() {
11-
this.gen.initGenrand(new Date().getTime() % 1000000000);
11+
this.gen.initGenrand(Math.ceil(Math.random() * Number.MAX_SAFE_INTEGER));
1212

1313
// Bind `this` so namespaced is working correctly
1414
for (const name of Object.getOwnPropertyNames(MersenneModule.prototype)) {

0 commit comments

Comments
 (0)