Changes between Initial Version and Version 1 of Ticket #8902, comment 29
- Timestamp:
- 2013-07-31T08:23:09+02:00 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #8902, comment 29
initial v1 5 5 > Why? V is int so result is same. I choose this because mask and move looks more illustrative for me. 6 6 7 Because 0xf0 before the s ift is useless. Applying the 0x0f after moving ensures that for v > 255 or < 0 it does not throw exception. If it is sure, that always v >= 0 && v <= 255, then {{{[v >> 4]}}} is all you need.7 Because 0xf0 before the shift is useless. Applying the 0x0f after moving ensures that for v > 255 or < 0 it does not throw exception. If it is sure, that always v >= 0 && v <= 255, then {{{[v >> 4]}}} is all you need.