diff --git a/src/compiler/irgen.js b/src/compiler/irgen.js index 295fe9df99..73bb2f85ac 100644 --- a/src/compiler/irgen.js +++ b/src/compiler/irgen.js @@ -362,8 +362,8 @@ class ScriptTreeGenerator { const operator = block.fields.OPERATOR.value.toLowerCase(); switch (operator) { case 'abs': return new IntermediateInput(InputOpcode.OP_ABS, InputType.NUMBER_POS | InputType.NUMBER_ZERO, {value}); - case 'floor': return new IntermediateInput(InputOpcode.OP_FLOOR, InputType.NUMBER, {value}); - case 'ceiling': return new IntermediateInput(InputOpcode.OP_CEILING, InputType.NUMBER, {value}); + case 'floor': return new IntermediateInput(InputOpcode.OP_FLOOR, InputType.NUMBER_INT | InputType.NUMBER_INF, {value}); + case 'ceiling': return new IntermediateInput(InputOpcode.OP_CEILING, InputType.NUMBER_INT | InputType.NUMBER_INF, {value}); case 'sqrt': return new IntermediateInput(InputOpcode.OP_SQRT, InputType.NUMBER_OR_NAN, {value}); case 'sin': return new IntermediateInput(InputOpcode.OP_SIN, InputType.NUMBER_OR_NAN, {value}); case 'cos': return new IntermediateInput(InputOpcode.OP_COS, InputType.NUMBER_OR_NAN, {value}); @@ -458,7 +458,7 @@ class ScriptTreeGenerator { }); } case 'operator_round': - return new IntermediateInput(InputOpcode.OP_ROUND, InputType.NUMBER, { + return new IntermediateInput(InputOpcode.OP_ROUND, InputType.NUMBER_INT | InputType.NUMBER_INF, { value: this.descendInputOfBlock(block, 'NUM').toType(InputType.NUMBER) }); case 'operator_subtract':