Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Feb 24, 2022
2 parents 6410fac + 12e6452 commit cfb3a11
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 125 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"@types/validator": "~13.7.1",
"@typescript-eslint/eslint-plugin": "~5.12.1",
"@typescript-eslint/parser": "~5.12.1",
"@vitest/ui": "~0.5.1",
"@vitest/ui": "~0.5.4",
"c8": "~7.11.0",
"conventional-changelog-cli": "~2.2.2",
"cypress": "~9.5.0",
Expand All @@ -122,7 +122,7 @@
"validator": "~13.7.0",
"vite": "~2.8.4",
"vitepress": "~0.22.2",
"vitest": "~0.5.1"
"vitest": "~0.5.4"
},
"packageManager": "pnpm@6.31.0",
"engines": {
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/mersenne.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class Mersenne {
private gen = new Gen();

constructor() {
this.gen.init_genrand(new Date().getTime() % 1000000000);
this.gen.initGenrand(new Date().getTime() % 1000000000);

// Bind `this` so namespaced is working correctly
for (const name of Object.getOwnPropertyNames(Mersenne.prototype)) {
Expand Down Expand Up @@ -36,7 +36,7 @@ export class Mersenne {
max = 32768;
}

return Math.floor(this.gen.genrand_real2() * (max - min) + min);
return Math.floor(this.gen.genrandReal2() * (max - min) + min);
}

/**
Expand All @@ -50,7 +50,7 @@ export class Mersenne {
throw new Error('seed(S) must take numeric argument; is ' + typeof S);
}

this.gen.init_genrand(S);
this.gen.initGenrand(S);
}

/**
Expand All @@ -66,6 +66,6 @@ export class Mersenne {
);
}

this.gen.init_by_array(A, A.length);
this.gen.initByArray(A, A.length);
}
}
Loading

0 comments on commit cfb3a11

Please sign in to comment.