js: Use bitwise | 0 for op.floor
This commit is contained in:
1 file changed
+1
-1
@@ -394,7 +394,7 @@ class JSGenerator {
|
||||
case 'op.e^':
|
||||
return new TypedInput(`Math.exp(${this.descendInput(node.value).asNumber()})`, TYPE_NUMBER);
|
||||
case 'op.floor':
|
||||
return new TypedInput(`Math.floor(${this.descendInput(node.value).asNumber()})`, TYPE_NUMBER);
|
||||
return new TypedInput(`(${this.descendInput(node.value).asNumber()} | 0)`, TYPE_NUMBER);
|
||||
case 'op.greater': {
|
||||
const left = this.descendInput(node.left);
|
||||
const right = this.descendInput(node.right);
|
||||
|
||||
Reference in new issue
Block a user