3 ms·
Most CPU's has signed and unsigned right shift instructions (left shift is the same), so yes it works (You can test this in C by casting a signed to unsigned be
by whizzter 7mo ago
Most CPU's has signed and unsigned right shift instructions (left shift is the same), so yes it works (You can test this in C by casting a signed to unsigned before shifting).
The biggest caveat is that right shifting -1 still produces -1 instead of 0, but that's usually fine for much older game fixed-point maths since -1 is close enough to 0.
- deleted 7mo ago[deleted]
- lefty2 7mo ago> -1 still produces -1 instead of 0 That could be a problem depending how you are using it.