add an rng func

This commit is contained in:
Tangent Wantwight 2019-12-21 17:22:33 -05:00
parent f75473b532
commit 5059c5d0d1
1 changed files with 9 additions and 0 deletions

View File

@ -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;
}