| 607 | |
| 608 | |
| 609 | static void setseed (lua_State *L, Rand64 *state, |
| 610 | lua_Unsigned n1, lua_Unsigned n2) { |
| 611 | int i; |
| 612 | state[0] = Int2I(n1); |
| 613 | state[1] = Int2I(0xff); /* avoid a zero state */ |
| 614 | state[2] = Int2I(n2); |
| 615 | state[3] = Int2I(0); |
| 616 | for (i = 0; i < 16; i++) |
| 617 | nextrand(state); /* discard initial values to "spread" seed */ |
| 618 | lua_pushinteger(L, n1); |
| 619 | lua_pushinteger(L, n2); |
| 620 | } |
| 621 | |
| 622 | |
| 623 | /* |
no test coverage detected