diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-10 15:37:44 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-03-10 15:37:44 -0300 |
commit | 73aa465a8ed8dee6c6a27a6f8b2f51227b70789d (patch) | |
tree | 496a63ffffe0312f1d0b9882d97944fa38ed7801 /lmathlib.c | |
parent | 3d0577f4b98908be3f2d697ab75c5fbbd3f6999b (diff) | |
download | lua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.tar.gz lua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.tar.bz2 lua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.zip |
some name changes
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? */ |