mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 20:39:29 +08:00
(Binary): added RotByteR and RotByteL methods.
This commit is contained in:
parent
1ee96fc3e9
commit
6d6b81c88f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user