-
-
Notifications
You must be signed in to change notification settings - Fork 933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
datatype.number does not produce random number when min = max + precision #329
Comments
The problem lies on this line: // src/datatype.ts > number(...) {...}
if (typeof options.max === 'undefined') {
options.max = 99999;
} Since if (typeof options.max === 'undefined') {
options.max = options.min + 99999;
} And it should be good enough, I hope. |
I know where is the problem :) I would normally provide a PR, but @Shinigami92 asked not to do anything until we go to 6.1. so I just created this issue... |
@pkuczynski We are working on |
Yeah, let me have a look now :) |
Done in #664 |
Describe the bug
faker.datatype.number
returns always the same value=max+precision
, whenmin = max + precision
Reproduction
Additional Info
A check ensuring
max
is reasonably larger thenmin
is missing...The text was updated successfully, but these errors were encountered: