Package com.glitchybyte.zappy
Class GUtils
java.lang.Object
com.glitchybyte.zappy.GUtils
Common utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intbyteToInt(byte n) Converts a byte that is supposed to be unsigned into an int, in order to preserve the full byte range as a positive number.static intshortToInt(short n) Converts a short that is supposed to be unsigned into an int, in order to preserve the full short range as a positive number.
-
Method Details
-
byteToInt
public static int byteToInt(byte n) Converts a byte that is supposed to be unsigned into an int, in order to preserve the full byte range as a positive number.- Parameters:
n- byte value.- Returns:
- int value.
-
shortToInt
public static int shortToInt(short n) Converts a short that is supposed to be unsigned into an int, in order to preserve the full short range as a positive number.- Parameters:
n- short value.- Returns:
- int value.
-