I asked a question with little-to-no knowledge on bitwise operators. As a result, my question was more broad than it needed to be. Now that I'm armed with increased knowledge of bitwise operators, should I edit the question (and ask the answerer to edit their answer) to make the question more specific, or should it be left more broad?
Specific examples:
- I didn't know about
& 0xFF
being synonymous with% 256
, and so my question used a mixture of copy-pasted& 0xFF
and my custom-madeMaths.clamp
function. (I would change this to all use& 0xFF
) - Another answer I had copied from added
(1 << 24)
to the stored number, and I didn't realise that it would work the same in my use case without it. (I would remove all of this)
Is editing like this discouraged, as it can affect answers, or is it encouraged, as it makes the question/answers more useful for later viewers?
& 0xFF
and% 256
are certainly not synonymous, they behave differently for negative operands. rextester.com/ZXRFLF44031