aboutsummaryrefslogtreecommitdiff
path: root/lmathlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2016-12-22 11:08:50 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2016-12-22 11:08:50 -0200
commit2a235312f029cbd2b1eb79f158d4f74b3ffa1b85 (patch)
treeee359ba97c390d1d6709243ab7c92c1e8252617a /lmathlib.c
parent9903dd52a39fbe4531596b1266e226f01769de21 (diff)
downloadlua-2a235312f029cbd2b1eb79f158d4f74b3ffa1b85.tar.gz
lua-2a235312f029cbd2b1eb79f158d4f74b3ffa1b85.tar.bz2
lua-2a235312f029cbd2b1eb79f158d4f74b3ffa1b85.zip
detail (removing spaces at end of lines)
Diffstat (limited to 'lmathlib.c')
-rw-r--r--lmathlib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lmathlib.c b/lmathlib.c
index 4cf90ce4..e0240c9b 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lmathlib.c,v 1.117 2015/10/02 15:39:23 roberto Exp roberto $ 2** $Id: lmathlib.c,v 1.118 2016/12/20 18:37:00 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*/
@@ -265,7 +265,7 @@ static int math_random (lua_State *L) {
265 default: return luaL_error(L, "wrong number of arguments"); 265 default: return luaL_error(L, "wrong number of arguments");
266 } 266 }
267 /* random integer in the interval [low, up] */ 267 /* random integer in the interval [low, up] */
268 luaL_argcheck(L, low <= up, 1, "interval is empty"); 268 luaL_argcheck(L, low <= up, 1, "interval is empty");
269 luaL_argcheck(L, low >= 0 || up <= LUA_MAXINTEGER + low, 1, 269 luaL_argcheck(L, low >= 0 || up <= LUA_MAXINTEGER + low, 1,
270 "interval too large"); 270 "interval too large");
271 r *= (double)(up - low) + 1.0; 271 r *= (double)(up - low) + 1.0;
@@ -284,9 +284,9 @@ static int math_randomseed (lua_State *L) {
284static int math_type (lua_State *L) { 284static int math_type (lua_State *L) {
285 if (lua_type(L, 1) == LUA_TNUMBER) { 285 if (lua_type(L, 1) == LUA_TNUMBER) {
286 if (lua_isinteger(L, 1)) 286 if (lua_isinteger(L, 1))
287 lua_pushliteral(L, "integer"); 287 lua_pushliteral(L, "integer");
288 else 288 else
289 lua_pushliteral(L, "float"); 289 lua_pushliteral(L, "float");
290 } 290 }
291 else { 291 else {
292 luaL_checkany(L, 1); 292 luaL_checkany(L, 1);