-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Add math.Rand that calls rand.Float64 #11833
Comments
Out of curiosity, how do you currently use the random numbers generated with your examples above? I suspect we'd be more likely to implement a single
|
I'm shifting images that are placed on top of each other slightly so that all of them are visible. This requires generating a random float that is between 2 numbers. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Currently random ints have to be created like so:
Where 0 and 9 specify the range for the number to be generate in.
And random floats have to be generated like so:
Where 0.1 is the amount of precision desired,
0*the precision
is the minimum bound, and90*the precision
is the upper bound.It would be much easier if their were functions:
The text was updated successfully, but these errors were encountered: