diff options
Diffstat (limited to 'benches/support.rs')
-rw-r--r-- | benches/support.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/benches/support.rs b/benches/support.rs index 3fe5dd7..27da939 100644 --- a/benches/support.rs +++ b/benches/support.rs @@ -7,6 +7,12 @@ pub struct PCG32 { inc: u64, } +impl Default for PCG32 { + fn default() -> Self { + PCG32::seed(0x853c49e6748fea9b, 0xda3e39cb94b95bdb) + } +} + impl PCG32 { pub fn seed(initstate: u64, initseq: u64) -> Self { let mut rng = PCG32 { @@ -19,10 +25,6 @@ impl PCG32 { rng } - pub fn default() -> Self { - PCG32::seed(0x853c49e6748fea9b, 0xda3e39cb94b95bdb) - } - pub fn next_u32(&mut self) -> u32 { let oldstate = self.state; self.state = oldstate |