@naturalcycles/js-lib
Version:
Standard library for universal (browser + Node.js) javascript
12 lines (11 loc) • 365 B
TypeScript
/**
* Function that returns a random number between 0 and 1.
* Exactly same signature as Math.random function.
*/
export type RandomFunction = () => number;
/**
* Returns a "deterministic Math.random() function"
*
* Based on: https://gist.github.com/mathiasbynens/5670917
*/
export declare function _createDeterministicRandom(seed?: number): RandomFunction;