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

Implement Bernoulli distribution #411

Merged
merged 24 commits into from
May 15, 2018
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document panics of gen_bool
  • Loading branch information
vks committed May 11, 2018

Verified

This commit was signed with the committer’s verified signature.
eljamm Fedi Jamoussi
commit eb47e3bdcbf517f41843703c67d0fe669cfbc264
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -483,6 +483,10 @@ pub trait Rng: RngCore {
/// println!("{}", rng.gen_bool(1.0 / 3.0));
/// ```
///
/// # Panics
///
/// If `p` < 0 or `p` > 1.
///
/// # Accuracy note
///
/// `gen_bool` uses 32 bits of the RNG, so if you use it to generate close