MCPcopy Create free account
hub / github.com/NthTensor/Forte / next

Method next

src/util.rs:38–46  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

36 }
37
38 fn next(&self) -> u64 {
39 let mut x = self.state.get();
40 debug_assert_ne!(x, 0);
41 x ^= x >> 12;
42 x ^= x << 25;
43 x ^= x >> 27;
44 self.state.set(x);
45 x.wrapping_mul(0x2545_f491_4f6c_dd1d)
46 }
47
48 /// Return a value from `0..n`.
49 pub fn next_usize(&self, n: usize) -> usize {

Callers 2

next_batchMethod · 0.80
next_usizeMethod · 0.80

Calls 2

getMethod · 0.80
setMethod · 0.80

Tested by

no test coverage detected