3 ms·
Right shift can get tricky for negative numbers. There are two operators for it, one which respects the sign bit, the other does not: - https://developer.mozil
by rzzzt 5y ago
Right shift can get tricky for negative numbers. There are two operators for it, one which respects the sign bit, the other does not:
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Right_shift https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Unsigned_right_shift https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...