(Binary): added RotByteR and RotByteL methods.

This commit is contained in:
morkt 2015-12-03 15:51:06 +04:00
parent 1ee96fc3e9
commit 6d6b81c88f

View File

@ -116,6 +116,18 @@ namespace GameRes.Utility
count &= 0x1F;
return v << count | v >> (32-count);
}
public static byte RotByteR (byte v, int count)
{
count &= 7;
return (byte)(v >> count | v << (8-count));
}
public static byte RotByteL (byte v, int count)
{
count &= 7;
return (byte)(v << count | v >> (8-count));
}
}
public static class BigEndian