Skip to content

Commit 5447b65

Browse files
committed
docs: fix mersenne rand mix max confusion
although mersenne automatically swap the value if min is bigger than max, but it's a good practice to clear out the confusion
1 parent 360bec7 commit 5447b65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mersenne.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ export class Mersenne {
2020
}
2121

2222
/**
23-
* Generates a random number between `[min, max)`.
23+
* Generates a random number between `[max, min)`.
2424
*
2525
* @param max The maximum number. Defaults to `0`.
2626
* @param min The minimum number. Defaults to `32768`.
2727
*
2828
* @example
2929
* faker.mersenne.rand() // 15515
30-
* faker.mersenne.rand(500, 1000) // 578
30+
* faker.mersenne.rand(1000, 500) // 578
3131
*/
3232
rand(max = 32768, min = 0): number {
3333
if (min > max) {

0 commit comments

Comments
 (0)