Fix some comments for random generator
This commit is contained in:
@@ -426,15 +426,16 @@ LuaDefine(math_random, "(args...)",
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
LuaDefine(math_randomstate, "(seed)",
|
LuaDefine(math_randomstate, "seed",
|
||||||
"|Create and return a randomstate table."
|
"|Create and return a randomstate table."
|
||||||
"|This is a lua table that stores the state for a random"
|
"|This is a lua table that stores the state for a random"
|
||||||
"|number generator. A randomstate table can be passed"
|
"|number generator. A randomstate table can be passed"
|
||||||
"|to math.random."
|
"|to math.random."
|
||||||
"|"
|
"|"
|
||||||
"|You can optionally omit the seed, in which case it will"
|
"|You can optionally omit the seed, in which case a"
|
||||||
"|pick a seed randomly. Automatically-generated seeds are"
|
"|seed will be chosen randomly. Automatically-generated"
|
||||||
"|guaranteed never to be the same as user-specified seeds.") {
|
"|seeds are guaranteed never to be the same as"
|
||||||
|
"|user-specified seeds.") {
|
||||||
double seed;
|
double seed;
|
||||||
if (lua_gettop(L) == 0) {
|
if (lua_gettop(L) == 0) {
|
||||||
World *w = World::fetch_global_pointer(L);
|
World *w = World::fetch_global_pointer(L);
|
||||||
|
|||||||
Reference in New Issue
Block a user