If you want to do a quick modulo that falls on a number in the (2,4,8,16) series, you can use the AND bitwise operator with the bound-1 value.
Example:
% 4, is the same as & 3
% 8, is the same as & 7
etc..
Top-level
If you want to do a quick modulo that falls on a number in the (2,4,8,16) series, you can use the AND bitwise operator with the bound-1 value. Example: % 4, is the same as & 3 1 comment
|
bedoo bedoo bedoo