Skip to content

@dice-roller/rpg-dice-roller / engines

engines ​

Random engines for controlling how dice are rolled.

Classes ​

ClassDescription
MersenneTwister19937An Engine that is a pseudorandom number generator using the Mersenne Twister algorithm based on the prime 2**19937 − 1

Variables ​

VariableDescription
browserCryptoAn Engine that relies on the globally-available crypto.getRandomValues, which is typically available in modern browsers.
nativeMathAn int32-producing Engine that uses Math.random()
nodeCryptoAn Engine that relies on the node-available require('crypto').randomBytes, which has been available since 0.58.

MIT Licensed · Credits