Skip to content

Commit

Permalink
Implement Rng::get_seed
Browse files Browse the repository at this point in the history
This commit resolves #32.
  • Loading branch information
aleksanderkrauze committed Jul 23, 2022
1 parent 5f8bdb6 commit 803cf08
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit 803cf08

Please sign in to comment.