Implemented RNG in Asm.js