Skip to content

Commit

Permalink
Replace manual f64::clamp implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
FreezyLemon committed Apr 21, 2024
1 parent 5707311 commit 640a84c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/function/beta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,7 @@ pub fn inv_beta_reg(mut a: f64, mut b: f64, mut x: f64) -> f64 {
}
}

if p < 0.0001 {
p = 0.0001;
} else if 0.9999 < p {
p = 0.9999;
}
p = p.clamp(0.0001, 0.9999);

// Remark AS R83
// http://www.jstor.org/stable/2347779
Expand Down

0 comments on commit 640a84c

Please sign in to comment.