0.2.0 • Published 6 months ago
nativeprng v0.2.0
nativeprng
Native Mulberry32, SplitMix32, and Thrust (63-bit) PRNG functions.
Installation
npm install nativeprng
Usage
import { mulberry32, splitMix32, thrust } from 'nativeprng'
mulberry32.setState(999)
mulberry32.getUint32() // 4165713787
mulberry32.getUint32() // 2726356805
splitMix32.setState(999)
splitMix32.getUint32() // 1391740943
splitMix32.getUint32() // 2804096416
thrust.setState(999n)
thrust.getUint64() // 1282685676472565925n
thrust.getUint64() // 10605289615821262735n