use {
core::num::NonZeroU16,
wyhash::wyrng,
};
#[derive(Default)]
pub struct RandomNumberGenerator(u64);
impl super::NumberGenerator for RandomNumberGenerator
{
#[inline]
fn rand_upto(
&mut self,
exclusive_end: NonZeroU16,
) -> u16
{
#![allow(clippy::as_conversions, clippy::cast_possible_truncation)]
wyrng(&mut self.0) as u16 % exclusive_end
}
}