(Binary): added RotR and RotL methods.

This commit is contained in:
morkt 2015-12-01 11:24:48 +04:00
parent 95e861c5b1
commit 1ee96fc3e9

View File

@ -104,6 +104,18 @@ namespace GameRes.Utility
{
return GetCString (data, index, length_limit, Encodings.cp932);
}
public static uint RotR (uint v, int count)
{
count &= 0x1F;
return v >> count | v << (32-count);
}
public static uint RotL (uint v, int count)
{
count &= 0x1F;
return v << count | v >> (32-count);
}
}
public static class BigEndian