//! Utils /// Get a random value between these two inclusive pub fn jitter(min: T, max: T) -> T where T: rand::distributions::uniform::SampleUniform { use rand::Rng; let mut thread = rand::thread_rng(); let dist = rand::distributions::Uniform::new_inclusive(min, max); thread.sample(dist) } /// Compare pointer identity #[inline(always)] pub fn ptr_eq(ptr: &T, other: &T) -> bool { ptr as *const T as usize == other as *const T as usize }