[NOTHING CHANGED] Assorted fixes #48

Closed
asiekierka wants to merge 61 commits from asiekierka/master into master
Showing only changes of commit 66130964c6 - Show all commits

View File

@@ -300,7 +300,7 @@ public class MathLib extends TwoArgFunction {
LuaValue n = args.arg1();
/* number is its own integer part, no fractional part */
if (n.islong())
return varargsOf(n, valueOf(0.0));
return varargsOf(n.tonumber(), valueOf(0.0));
double x = n.checkdouble();
/* integer part (rounds toward zero) */
double intPart = x > 0? Math.floor(x): Math.ceil(x);