mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-12 04:49:32 +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;
|
count &= 0x1F;
|
||||||
return v << count | v >> (32-count);
|
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
|
public static class BigEndian
|
||||||
|
Loading…
x
Reference in New Issue
Block a user