MCPcopy Create free account
hub / github.com/SeaQL/FireDBG.for.Rust / random

Function random

debugger/examples/testdata.rs:100–108  ·  view source on GitHub ↗

Pseudorandom number generator from the "Xorshift RNGs" paper by George Marsaglia. https://github.com/rust-lang/rust/blob/1.55.0/library/core/src/slice/sort.rs#L559-L573

(seed: u32)

Source from the content-addressed store, hash-verified

98//
99// https://github.com/rust-lang/rust/blob/1.55.0/library/core/src/slice/sort.rs#L559-L573
100fn random(seed: u32) -> impl Iterator<Item = u32> {
101 let mut random = seed;
102 std::iter::repeat_with(move || {
103 random ^= random << 13;
104 random ^= random >> 17;
105 random ^= random << 5;
106 random
107 })
108}
109
110/// Simulate the debugger state
111struct State {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected