diff options
| author | Shinigami <[email protected]> | 2022-12-09 09:12:29 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-09 09:12:29 +0100 |
| commit | 671631b0efa84ec4ff17827c7263a261de2d3fa0 (patch) | |
| tree | b2c0ed235d657f864e842082822937374657fc5a /src/modules/helpers | |
| parent | 6baa8ceebe63c716a62903f4c8ddaddb799aecdc (diff) | |
| download | faker-671631b0efa84ec4ff17827c7263a261de2d3fa0.tar.xz faker-671631b0efa84ec4ff17827c7263a261de2d3fa0.zip | |
feat(number)!: change float default params (#1642)
Diffstat (limited to 'src/modules/helpers')
| -rw-r--r-- | src/modules/helpers/index.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index 37487247..4cf9ad38 100644 --- a/src/modules/helpers/index.ts +++ b/src/modules/helpers/index.ts @@ -484,9 +484,7 @@ export class HelpersModule { let index: number; while (i-- > min) { - index = Math.floor( - (i + 1) * this.faker.number.float({ min: 0, max: 0.99 }) - ); + index = Math.floor((i + 1) * this.faker.number.float({ max: 0.99 })); temp = arrayCopy[index]; arrayCopy[index] = arrayCopy[i]; arrayCopy[i] = temp; |
