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

Improve Random docs #3

Open
gjp opened this issue Oct 4, 2011 · 1 comment
Open

Improve Random docs #3

gjp opened this issue Oct 4, 2011 · 1 comment

Comments

@gjp
Copy link

gjp commented Oct 4, 2011

I'll have a go at clarifying this one.

@gjp
Copy link
Author

gjp commented Oct 4, 2011

Kernel.rand behaves differently from Random.rand in counter-intuitive ways. I'm not sure if I'll be doing people a favor by documenting the corner cases:

ruby-1.9.3-rc1 :024 > rand(1.9)
=> 0 # always!

ruby-1.9.3-rc1 :031 > rand(-0.1)
=> 0.9186990608553834

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant