Line data Source code
1 : import { Engine } from "../types.ts"; 2 1 : import { UINT32_SIZE } from "../utils/constants.ts"; 3 : 4 : /** 5 : * An int32-producing Engine that uses `Math.random()` 6 : */ 7 1 : export const nativeMath: Engine = { 8 0 : next() { 9 0 : return (Math.random() * UINT32_SIZE) | 0; 10 0 : } 11 1 : };