diff --git a/src/generator/MersenneTwister.ts b/src/generator/MersenneTwister.ts index c730fa1..61cebf6 100644 --- a/src/generator/MersenneTwister.ts +++ b/src/generator/MersenneTwister.ts @@ -91,7 +91,7 @@ function fromState(state: readonly number[]): RandomGenerator { return MersenneTwister.fromState(state); } -export default Object.assign( +export const mersenne = Object.assign( function (seed: number): RandomGenerator { return MersenneTwister.from(seed); }, diff --git a/src/pure-rand-default.ts b/src/pure-rand-default.ts index 075a01b..eb831d1 100644 --- a/src/pure-rand-default.ts +++ b/src/pure-rand-default.ts @@ -1,6 +1,6 @@ import type { RandomGenerator } from './types/RandomGenerator'; import { congruential32 } from './generator/LinearCongruential'; -import mersenne from './generator/MersenneTwister'; +import { mersenne } from './generator/MersenneTwister'; import { xorshift128plus } from './generator/XorShift'; import { xoroshiro128plus } from './generator/XoroShiro'; diff --git a/test/unit/distribution/UniformArrayIntDistribution.noreg.spec.ts b/test/unit/distribution/UniformArrayIntDistribution.noreg.spec.ts index 626eb12..479b080 100644 --- a/test/unit/distribution/UniformArrayIntDistribution.noreg.spec.ts +++ b/test/unit/distribution/UniformArrayIntDistribution.noreg.spec.ts @@ -2,7 +2,7 @@ import fc from 'fast-check'; import { ArrayInt } from '../../../src/distribution/internals/ArrayInt'; import { uniformArrayIntDistribution } from '../../../src/distribution/UniformArrayIntDistribution'; -import mersenne from '../../../src/generator/MersenneTwister'; +import { mersenne } from '../../../src/generator/MersenneTwister'; import { RandomGenerator } from '../../../src/types/RandomGenerator'; describe('uniformArrayIntDistribution [non regression]', () => { diff --git a/test/unit/distribution/UniformBigIntDistribution.noreg.spec.ts b/test/unit/distribution/UniformBigIntDistribution.noreg.spec.ts index 00b57fc..404f5ec 100644 --- a/test/unit/distribution/UniformBigIntDistribution.noreg.spec.ts +++ b/test/unit/distribution/UniformBigIntDistribution.noreg.spec.ts @@ -1,5 +1,5 @@ import { uniformBigIntDistribution } from '../../../src/distribution/UniformBigIntDistribution'; -import mersenne from '../../../src/generator/MersenneTwister'; +import { mersenne } from '../../../src/generator/MersenneTwister'; import { RandomGenerator } from '../../../src/types/RandomGenerator'; describe('uniformBigIntDistribution [non regression]', () => { diff --git a/test/unit/distribution/UniformBigIntDistribution.spec.ts b/test/unit/distribution/UniformBigIntDistribution.spec.ts index 6883d9a..0dbefed 100644 --- a/test/unit/distribution/UniformBigIntDistribution.spec.ts +++ b/test/unit/distribution/UniformBigIntDistribution.spec.ts @@ -3,7 +3,7 @@ import * as fc from 'fast-check'; import { uniformBigIntDistribution } from '../../../src/distribution/UniformBigIntDistribution'; import { uniformIntDistribution } from '../../../src/distribution/UniformIntDistribution'; -import mersenne from '../../../src/generator/MersenneTwister'; +import { mersenne } from '../../../src/generator/MersenneTwister'; const bigIntArbitrary = fc .tuple(fc.boolean(), fc.nat(0xffffffff), fc.nat(0xffffffff), fc.nat(0xffffffff), fc.nat(0xffffffff)) diff --git a/test/unit/distribution/UniformIntDistribution.noreg.spec.ts b/test/unit/distribution/UniformIntDistribution.noreg.spec.ts index ed4d5a8..2f3c084 100644 --- a/test/unit/distribution/UniformIntDistribution.noreg.spec.ts +++ b/test/unit/distribution/UniformIntDistribution.noreg.spec.ts @@ -1,7 +1,7 @@ import fc from 'fast-check'; import { uniformIntDistribution } from '../../../src/distribution/UniformIntDistribution'; -import mersenne from '../../../src/generator/MersenneTwister'; +import { mersenne } from '../../../src/generator/MersenneTwister'; import { RandomGenerator } from '../../../src/types/RandomGenerator'; describe('uniformIntDistribution [non regression]', () => { diff --git a/test/unit/generator/MersenneTwister.spec.ts b/test/unit/generator/MersenneTwister.spec.ts index 0462372..987befc 100644 --- a/test/unit/generator/MersenneTwister.spec.ts +++ b/test/unit/generator/MersenneTwister.spec.ts @@ -1,7 +1,7 @@ import * as assert from 'assert'; import * as fc from 'fast-check'; -import mersenne from '../../../src/generator/MersenneTwister'; +import { mersenne } from '../../../src/generator/MersenneTwister'; import * as p from './RandomGenerator.properties'; describe('mersenne', () => {