1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

rand: add non uniform distributions in the rand.dist module (#9274)

This commit is contained in:
Subhomoy Haldar
2021-03-13 00:54:43 +05:30
committed by GitHub
parent 0c33656a19
commit 08da33fa5a
5 changed files with 197 additions and 2 deletions

View File

@@ -71,7 +71,9 @@ pub fn set_rng(rng &PRNG) {
default_rng = rng
}
// seed sets the given array of `u32` values as the seed for the `default_rng`. It is recommended to use
// seed sets the given array of `u32` values as the seed for the `default_rng`. The default_rng is
// an instance of WyRandRNG which takes 2 u32 values. When using a custom RNG, make sure to use
// the correct number of u32s.
pub fn seed(seed []u32) {
default_rng.seed(seed)
}