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

v.gen.js: fix method calls and other codegen parts, rand module compiles (#11205)

This commit is contained in:
playX
2021-08-18 11:33:37 +03:00
committed by GitHub
parent c51f83efba
commit 0121c8b4fd
9 changed files with 301 additions and 130 deletions

13
vlib/rand/config/config.v Normal file
View File

@ -0,0 +1,13 @@
module config
import rand.seed
// PRNGConfigStruct is a configuration struct for creating a new instance of the default RNG.
// Note that the RNGs may have a different number of u32s required for seeding. The default
// generator WyRand used 64 bits, ie. 2 u32s so that is the default. In case your desired generator
// uses a different number of u32s, use the `seed.time_seed_array()` method with the correct
// number of u32s.
pub struct PRNGConfigStruct {
pub:
seed_ []u32 = seed.time_seed_array(2)
}