MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / randseed

Function randseed

extlibs/lua/src/lmathlib.c:610–614  ·  view source on GitHub ↗

** Set a "random" seed. To get some randomness, use the current time ** and the address of 'L' (in case the machine does address space layout ** randomization). */

Source from the content-addressed store, hash-verified

608** randomization).
609*/
610static void randseed (lua_State *L, RanState *state) {
611 lua_Unsigned seed1 = (lua_Unsigned)time(NULL);
612 lua_Unsigned seed2 = (lua_Unsigned)(size_t)L;
613 setseed(L, state->s, seed1, seed2);
614}
615
616
617static int math_randomseed (lua_State *L) {

Callers 2

math_randomseedFunction · 0.85
setrandfuncFunction · 0.85

Calls 1

setseedFunction · 0.85

Tested by

no test coverage detected