 Description:
[None]
public static long rotateCharacter(long character){
int p = 32, ix = 0, iy = 0;
long rotated = 0;
while(p-- > 0){
if((character & (1 << p)) > 0){
rotated |= (1L << (31 - (3 - ix) * 8 - iy));
}
if(++ix == 4){
++iy;
ix = 0;
}
}
return rotated;
}
 Tags: [No tags]
Posted 2010-01-11 18:20:25 GMT
Expires
never
|