Skip to content

Commit 6651c75

Browse files
authored
Merge pull request rust-random#420 from pitdicker/closed_open_float_conversion
Switch the `Standard` distribution for floats to [0, 1)
2 parents 2e81551 + e085330 commit 6651c75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

distributions.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ distr!(distr_standard_codepoint, char, Standard);
9696

9797
distr_float!(distr_standard_f32, f32, Standard);
9898
distr_float!(distr_standard_f64, f64, Standard);
99+
distr_float!(distr_open01_f32, f32, Open01);
100+
distr_float!(distr_open01_f64, f64, Open01);
101+
distr_float!(distr_openclosed01_f32, f32, OpenClosed01);
102+
distr_float!(distr_openclosed01_f64, f64, OpenClosed01);
99103

100104
// distributions
101105
distr_float!(distr_exp, f64, Exp::new(1.23 * 4.56));

0 commit comments

Comments
 (0)