Implement Rng::get_seed

This commit resolves #32.
This commit is contained in:
Aleksander Krauze 2022-07-23 18:35:04 +02:00
parent 5f8bdb636f
commit 803cf086d9
1 changed files with 6 additions and 0 deletions

View File

@ -427,6 +427,12 @@ impl Rng {
self.0.set(seed);
}
/// Gives back **current** seed that is being held by this generator.
#[inline]
pub fn get_seed(&self) -> u64 {
self.0.get()
}
/// Shuffles a slice randomly.
#[inline]
pub fn shuffle<T>(&self, slice: &mut [T]) {