Skip to content

Commit 367fd2f

Browse files
committed
Fixed ctrl-c ctrl-v mistakes in comments
1 parent 4746171 commit 367fd2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/distributions/binomial.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use distributions::{Sample, IndependentSample};
1515
use distributions::log_gamma::log_gamma;
1616
use std::f64::consts::PI;
1717

18-
/// The binomial distribution `Binomial(lambda)`.
18+
/// The binomial distribution `Binomial(n, p)`.
1919
///
2020
/// This distribution has density function: `f(k) = n!/(k! (n-k)!) p^k (1-p)^(n-k)` for `k >= 0`.
2121
///
@@ -35,8 +35,8 @@ pub struct Binomial {
3535
}
3636

3737
impl Binomial {
38-
/// Construct a new `Binomial` with the given shape parameter
39-
/// `lambda`. Panics if `lambda <= 0`.
38+
/// Construct a new `Binomial` with the given shape parameters
39+
/// `n`, `p`. Panics if `p <= 0` or `p >= 1`.
4040
pub fn new(n: u64, p: f64) -> Binomial {
4141
assert!(p > 0.0, "Binomial::new called with `p` <= 0");
4242
assert!(p < 1.0, "Binomial::new called with `p` >= 1");

0 commit comments

Comments
 (0)