use core::num::Wrapping;
use fon::chan::Ch24;
const SEQUENCE: u64 = 0xb5ad4eceda1ce2a9;
#[derive(Default, Clone, Debug)]
#[allow(missing_copy_implementations)]
pub struct White {
x: Wrapping<u64>,
w: Wrapping<u64>,
}
impl White {
#[inline(always)]
pub fn new() -> Self {
Self::default()
}
#[inline(always)]
pub fn step(&mut self) -> fon::chan::Ch32 {
self.x *= self.x;
self.w += Wrapping(SEQUENCE);
self.x += self.w;
self.x = (self.x >> 32) | (self.x << 32);
Ch24::new((self.x.0 as i32) >> 8).into()
}
}