Skip to content

Commit

Permalink
Revert "js: Use bitwise | 0 for op.floor"
Browse files Browse the repository at this point in the history
This reverts commit 62f55e7.
  • Loading branch information
GarboMuffin committed Sep 19, 2020
1 parent eb28f8b commit 1db0328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/jsgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(`(${this.descendInput(node.value).asNumber()} | 0)`, TYPE_NUMBER);
return new TypedInput(`Math.floor(${this.descendInput(node.value).asNumber()})`, TYPE_NUMBER);
case 'op.greater': {
const left = this.descendInput(node.left);
const right = this.descendInput(node.right);
Expand Down

0 comments on commit 1db0328

Please sign in to comment.