equal
deleted
inserted
replaced
14 let mut prng = Self { |
14 let mut prng = Self { |
15 circular_buffer: buf, |
15 circular_buffer: buf, |
16 index: 54, |
16 index: 54, |
17 }; |
17 }; |
18 |
18 |
19 for _i in 0..2048 { |
19 prng.discard(2048); |
20 prng.get_next(); |
|
21 } |
|
22 |
20 |
23 prng |
21 prng |
|
22 } |
|
23 |
|
24 #[inline] |
|
25 pub fn discard(&mut self, count: usize) { |
|
26 for _i in 0..count { |
|
27 self.get_next(); |
|
28 } |
24 } |
29 } |
25 |
30 |
26 #[inline] |
31 #[inline] |
27 fn get_next(&mut self) -> u32 { |
32 fn get_next(&mut self) -> u32 { |
28 self.index = (self.index + 1) & 0x3f; |
33 self.index = (self.index + 1) & 0x3f; |