add an rng func
This commit is contained in:
parent
f75473b532
commit
5059c5d0d1
1 changed files with 9 additions and 0 deletions
|
@ -49,3 +49,12 @@ impl<T: Lights, I: Iterator> PixelIterator<T> for I
|
|||
self.for_each(|pixel| lights.render(pixel.borrow()));
|
||||
}
|
||||
}
|
||||
|
||||
pub fn murmurf(state: &mut u32) -> u32 {
|
||||
*state ^= *state >> 16;
|
||||
*state *= 0x85ebca6b;
|
||||
*state ^= *state >> 13;
|
||||
*state *= 0xc2b2ae35;
|
||||
*state ^= *state >> 16;
|
||||
return *state;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue