1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
private static uint CycleShift(uint val, int iShiftBit, bool isLeft) { uint temp = 0; uint result = 0; temp |= val; if (isLeft) { val <<= iShiftBit; temp >>= (32 - iShiftBit); result = val | temp; } else { val >>= iShiftBit; temp <<= (32 - iShiftBit); result = val | temp; } return result; }
|