File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: db34b5acd150d114f392c907fa28f92a5227d3db
2
+ refs/heads/master: b67bfe50efcea01a90aff7d13e240a43ecdabd19
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5
5
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
Original file line number Diff line number Diff line change @@ -94,22 +94,22 @@ impl extensions for rng {
94
94
( self . next ( ) as u64 << 32 ) | self . next ( ) as u64
95
95
}
96
96
97
- /// Return a random float in the interval [0,1]
97
+ /// Return a random float
98
98
fn gen_float ( ) -> float {
99
99
self . gen_f64 ( ) as float
100
100
}
101
101
102
- /// Return a random f32 in the interval [0,1]
102
+ /// Return a random f32
103
103
fn gen_f32 ( ) -> f32 {
104
104
self . gen_f64 ( ) as f32
105
105
}
106
106
107
- /// Return a random f64 in the interval [0,1]
107
+ /// Return a random f64
108
108
fn gen_f64 ( ) -> f64 {
109
109
let u1 = self . next ( ) as f64 ;
110
110
let u2 = self . next ( ) as f64 ;
111
111
let u3 = self . next ( ) as f64 ;
112
- const scale : f64 = ( u32:: max_value as f64 ) + 1.0f64 ;
112
+ let scale = u32:: max_value as f64 ;
113
113
ret ( ( u1 / scale + u2) / scale + u3) / scale;
114
114
}
115
115
Original file line number Diff line number Diff line change
1
+ S 2012-07-16 0e42004
2
+ macos-i386 67616307e5498327bcf4f0c13287e7f9f4439c1c
3
+ macos-x86_64 f3348eb9314895ffa71056fad8c1f79d8d45b161
4
+ freebsd-x86_64 70ac23545a9716d8b6190949b851276dc63e6437
5
+ linux-i386 dd4d35fabfb46d100c153d8f1245edb521380a03
6
+ linux-x86_64 764eb38a4732c530efcf7386771bca0408395aa2
7
+ winnt-i386 e421682c415faa7ebc012d18089312034a9da0de
8
+
1
9
S 2012-07-14 6822ec3
2
10
macos-i386 edf1e3482869dae26709611051615d4ffd64ffe8
3
11
macos-x86_64 30f23cfbe2d1abf009e8715ba0b8a65e42590020
You can’t perform that action at this time.
0 commit comments