Skip to content
Arthur Guiot edited this page May 25, 2018 · 1 revision

Generating random values

TheoremJS can generate random numbers between 0 and 1:

t.rand() // Similar to Math.random() => BigNumber

t.rand(2) // 2 random numbers => [BigNumber]

t.rand(1, true) // Cryptographically secure random number => BigNumber or [BigNumber]
Clone this wiki locally