nativeprng
v0.1.0
Published
Native Mulberry32, SplitMix32, and Thrust (64) PRNG functions.
Downloads
2
Readme
nativeprng
Native Mulberry32, SplitMix32, and Thrust (64) PRNG functions.
Installation
npm install nativeprng
Usage
import { Mulberry32, SplitMix32, Thrust } from 'nativeprng'
Mulberry32.setState(1985)
Mulberry32.getUint32() // 3527837133
Mulberry32.getUint32() // 3112574143
SplitMix32.setState(1985)
SplitMix32.getUint32() // 3153990299
SplitMix32.getUint32() // 2826677777
Thrust.setState(1985n)
Thrust.getUint64() // 13609337976186286977n
Thrust.getUint64() // 14715940130426179720n