uupaa.random.js
v0.3.3
Published
Random function(Xorshift implement)
Downloads
28
Maintainers
Readme
Random.js
Browser and NW.js(node-webkit)
<script src="<module-dir>/lib/WebModule.js"></script>
<script src="<module-dir>/lib/Random.js"></script>
<script>
var random = new Random();
random.next() // -> 0x000000000 - 0xffffffff
random.next() // -> 0x000000000 - 0xffffffff
random.next() // -> 0x000000000 - 0xffffffff
</script>
WebWorkers
importScripts("<module-dir>lib/WebModule.js");
importScripts("<module-dir>lib/Random.js");
...
Node.js
require("<module-dir>lib/WebModule.js");
require("<module-dir>lib/Random.js");
...