|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.monkeycoder.monkeynes.base.MathHelper
This class provdes several math related convenience constructs.
Originally part of the MonkeyNes project.
| Field Summary | |
static int[] |
bitMask
This array allows access to individual bits. |
static int[] |
byteMask
This array allows access to individual bytes. |
static int[] |
nibbleMask
This array allows access to individual nibbles. |
| Method Summary | |
static String |
getBinaryString8(int inInt)
Builds a 0 padded 8-bit binary string from an integer. |
static String |
getHexString(int inInt)
Builds a 0 padded 32-bit hexidecimal string from an integer. |
static String |
getHexString16(int inInt)
Builds a 0 padded 16-bit hexidecimal string from an integer. |
static String |
getHexString8(int inInt)
Builds a 0 padded 8-bit hexidecimal string from an integer. |
static int |
getWrappedAddress(int addr)
Forces an address to stay within the 64k range by wrapping it. |
static int |
getWrappedByte(int addr)
Forces a byte to stay within the 0-255 range by wrapping it. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int[] bitMask
public static final int[] nibbleMask
public static final int[] byteMask
| Method Detail |
public static int getWrappedAddress(int addr)
addr - The address to access.
public static int getWrappedByte(int addr)
addr - The address to access.
public static String getHexString(int inInt)
inInt - The number to convert into a hexidecimal string.
public static String getHexString8(int inInt)
inInt - The number to convert into a hexidecimal string.
public static String getHexString16(int inInt)
inInt - The number to convert into a hexidecimal string.
public static String getBinaryString8(int inInt)
inInt - The number to convert into a binary string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||