aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.eslintrc.js1
-rw-r--r--src/internal/mersenne.ts2
2 files changed, 1 insertions, 2 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index f7f7c6ff..6b5686f9 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -64,7 +64,6 @@ module.exports = defineConfig({
'unicorn/no-hex-escape': 'off',
'unicorn/no-instanceof-array': 'off',
'unicorn/no-negated-condition': 'off',
- 'unicorn/no-new-array': 'off',
'unicorn/no-object-as-default-parameter': 'off',
'unicorn/no-process-exit': 'off',
'unicorn/no-useless-switch-case': 'off',
diff --git a/src/internal/mersenne.ts b/src/internal/mersenne.ts
index 2d1cc4ce..6be5825d 100644
--- a/src/internal/mersenne.ts
+++ b/src/internal/mersenne.ts
@@ -79,7 +79,7 @@ class MersenneTwister19937 {
private readonly MATRIX_A = 0x9908b0df; // constant vector a
private readonly UPPER_MASK = 0x80000000; // most significant w-r bits
private readonly LOWER_MASK = 0x7fffffff; // least significant r bits
- private mt: number[] = new Array(this.N); // the array for the state vector
+ private mt: number[] = Array.from({ length: this.N }); // the array for the state vector
private mti = this.N + 1; // mti==N+1 means mt[N] is not initialized
/**