mirror of
https://github.com/SimplexDevelopment/Configurator.git
synced 2025-01-22 07:50:06 +00:00
Update Byter.java
This commit is contained in:
parent
cc3781226b
commit
3b60ca1813
@ -42,14 +42,14 @@ public final class Byter
|
|||||||
|
|
||||||
public static byte preservedShift(final byte b, final int shift)
|
public static byte preservedShift(final byte b, final int shift)
|
||||||
{
|
{
|
||||||
final int preserved = (b & 0x010000FF) & 0x0700FF;
|
final int preserved = (b & 0x010000FF) & 0x7F00FF;
|
||||||
final int shifted = b >> shift;
|
final int shifted = b >> shift;
|
||||||
return (byte) (shifted | preserved);
|
return (byte) (shifted | preserved);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte preservedUnsignedShift(final byte b, final int shift)
|
public static byte preservedUnsignedShift(final byte b, final int shift)
|
||||||
{
|
{
|
||||||
final int preserved = (b & 0x010000FF) & 0x0700FF;
|
final int preserved = (b & 0x010000FF) & 0x7F00FF;
|
||||||
final int shifted = b >>> shift;
|
final int shifted = b >>> shift;
|
||||||
return (byte) (shifted | preserved);
|
return (byte) (shifted | preserved);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user