MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / fork

Method fork

src/main/java/trace/random/Random.kt:31–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30 fun fork(): Random {
31 val v = Random()
32
33 val ns = source.mt!!.copyOf()
34 ns[10] = forked++
35 v.source = MersenneTwisterFast(ns)
36
37 v.a = a
38 v.b = b
39 v.bi = bi
40 v.c = c
41 v.d = d
42 v.T = T
43
44 return v
45 }
46
47 fun nextDouble(): Double {
48 while (bi < 0)
49 nextDouble(1.0)

Callers

nothing calls this directly

Calls 2

RandomClass · 0.85
MersenneTwisterFastClass · 0.85

Tested by

no test coverage detected