| 589 | |
| 590 | |
| 591 | static void setseed (lua_State *L, Rand64 *state, |
| 592 | lua_Unsigned n1, lua_Unsigned n2) { |
| 593 | int i; |
| 594 | state[0] = Int2I(n1); |
| 595 | state[1] = Int2I(0xff); /* avoid a zero state */ |
| 596 | state[2] = Int2I(n2); |
| 597 | state[3] = Int2I(0); |
| 598 | for (i = 0; i < 16; i++) |
| 599 | nextrand(state); /* discard initial values to "spread" seed */ |
| 600 | lua_pushinteger(L, n1); |
| 601 | lua_pushinteger(L, n2); |
| 602 | } |
| 603 | |
| 604 | |
| 605 | /* |
no test coverage detected