parent
dacbea8023
commit
5a2c30520f
@ -0,0 +1,14 @@
|
||||
//! Misc. Utilites
|
||||
use super::*;
|
||||
|
||||
/// Get a random value between these two inclusive
|
||||
pub fn jitter<T>(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)
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
use super::*;
|
||||
|
||||
pub use crate::ext::bytes::{
|
||||
memcpy as copy_bytes,
|
||||
memmove as move_bytes,
|
||||
};
|
Loading…
Reference in new issue