Fix ROUND, CEIL

This commit is contained in:
otya128 committed 2016-12-20 21:56:31 +09:00
1 parent 4cf742902d
commit f396726f65
1 file changed
+12
+12
View File
@@ -1144,6 +1144,10 @@ class BuiltinFunction
}
static Value FLOOR(Value val)
{
if (!val.isNumber)
{
throw new TypeMismatch("FLOOR");
}
if (val.isInteger)
{
return val;
@@ -1153,6 +1157,10 @@ class BuiltinFunction
}
static Value ROUND(Value val)
{
if (!val.isNumber)
{
throw new TypeMismatch("ROUND");
}
if (val.isInteger)
{
return val;
@@ -1162,6 +1170,10 @@ class BuiltinFunction
}
static Value CEIL(Value val)
{
if (!val.isNumber)
{
throw new TypeMismatch("CEIL");
}
if (val.isInteger)
{
return val;