Edin,
I assume that you misunderstand the & and the shifting operation << or >>
Shift left 5 positions: int xx = (int) (xDepth) << 5 (or multiply by 32)
Shift right 5 positions: int xx = (int)...
Type: Posts; User: Voodoo
Edin,
I assume that you misunderstand the & and the shifting operation << or >>
Shift left 5 positions: int xx = (int) (xDepth) << 5 (or multiply by 32)
Shift right 5 positions: int xx = (int)...
frankly, I don't understand what you mean. You got whatever xDepth is one of the 4 above mentioned values.
Edin....5 in binary is 101. Your operation int xx = (int) (xDepth) & 5; delivers only 4 values: 101 or 5, 100 or 4, 1 and 0. Is that what you want?