Skip to content

Commit

Permalink
Merge pull request #1452 from NetsBlox/fix-sign
Browse files Browse the repository at this point in the history
fix sign
  • Loading branch information
brollb committed Oct 18, 2023
2 parents 96234e7 + ed4f1e8 commit e41e05b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/threads.js
Original file line number Diff line number Diff line change
Expand Up @@ -4089,7 +4089,11 @@ Process.prototype.reportMonadic = function (fname, n) {
result = Math.pow(2, x);
break;
case 'id':
return n;
result = n;
break;
case 'sign':
result = n < 0 ? -1 : n > 0 ? 1 : 0;
break;
default:
nop();
}
Expand Down

0 comments on commit e41e05b

Please sign in to comment.