Changes between Initial Version and Version 1 of Ticket #8902, comment 29


Ignore:
Timestamp:
2013-07-31T08:23:09+02:00 (11 years ago)
Author:
stoecker

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8902, comment 29

    initial v1  
    55> Why? V is int so result is same. I choose this because mask and move looks more illustrative for me.
    66
    7 Because 0xf0 before the sift 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.
     7Because 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.