diff options
Diffstat (limited to 'lmathlib.c')
-rw-r--r-- | lmathlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmathlib.c,v 1.22 1999/12/14 18:31:20 roberto Exp roberto $ | 2 | ** $Id: lmathlib.c,v 1.23 1999/12/27 17:33:22 roberto Exp roberto $ |
3 | ** Standard mathematical library | 3 | ** Standard mathematical library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -147,7 +147,7 @@ static void math_random (lua_State *L) { | |||
147 | some systems (SunOS!) "rand()" may return a value larger than RAND_MAX */ | 147 | some systems (SunOS!) "rand()" may return a value larger than RAND_MAX */ |
148 | double r = (double)(rand()%RAND_MAX) / (double)RAND_MAX; | 148 | double r = (double)(rand()%RAND_MAX) / (double)RAND_MAX; |
149 | if (lua_getparam(L, 1) == LUA_NOOBJECT) /* no arguments? */ | 149 | if (lua_getparam(L, 1) == LUA_NOOBJECT) /* no arguments? */ |
150 | lua_pushnumber(L, r); /* real between 0 and 1 */ | 150 | lua_pushnumber(L, r); /* Number between 0 and 1 */ |
151 | else { | 151 | else { |
152 | int l, u; /* lower & upper limits */ | 152 | int l, u; /* lower & upper limits */ |
153 | if (lua_getparam(L, 2) == LUA_NOOBJECT) { /* only one argument? */ | 153 | if (lua_getparam(L, 2) == LUA_NOOBJECT) { /* only one argument? */ |