Skip to content
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 random float generation to stdlib #1018

Closed
jdm opened this issue Oct 9, 2011 · 1 comment
Closed

Add random float generation to stdlib #1018

jdm opened this issue Oct 9, 2011 · 1 comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@jdm
Copy link
Contributor

jdm commented Oct 9, 2011

Easy way: take the result of rand::mk_rng().next() and divide it by 4294967296.0, yielding a float in the range [0.0,1.0]

@Yoric
Copy link
Contributor

Yoric commented Oct 17, 2011

I'll do that.

@Yoric Yoric mentioned this issue Oct 17, 2011
@brson brson closed this as completed Oct 17, 2011
arielb1 pushed a commit to arielb1/rust that referenced this issue Apr 10, 2015
coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants