|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectMathUtils
public final class MathUtils
A class that contains several static utility methods. A class that contains several static methods for converting multiple bytes into one float or integer.
| Constructor Summary | |
|---|---|
MathUtils()
|
|
| Method Summary | |
|---|---|
static byte[] |
bitVector2ByteVector(int bitVector,
int length)
Convert an integer containing length bits into a vector of bytes. |
static double |
exp2(double val)
exp2. |
static byte[] |
Float2IBM(double fVal)
Converts a double to the standard IBM representation for a single precision real floating point number. |
static byte |
frexpExp(double val)
frexpExp, builds and gives the exponent base 2 for the floating point representation of a real number. |
static double |
frexpMant(double val)
frexpMant, builds and gives the mantissa base 2 for the floating point representation of a real number. |
static double |
IBM2FLoat(int a,
int b,
int c,
int d)
Convert four bytes into a float value. |
static int |
int2(int a,
int b)
Convert two bytes into a signed integer. |
static int |
int3(int a,
int b,
int c)
Convert three bytes into a signed integer. |
static int |
int4(int a,
int b,
int c,
int d)
Convert four bytes into a signed integer. |
static double |
log2(double val)
log2. |
static byte[] |
signedInt2Bytes(int val,
int numBytes)
signedInt2Bytes, converts a signed integer to a vector of bytes. |
static int |
uint2(int a,
int b)
Convert two bytes into an unsigned integer. |
static int |
uint3(int a,
int b,
int c)
Convert three bytes into an unsigned integer. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MathUtils()
| Method Detail |
|---|
public static int int2(int a,
int b)
a - higher byteb - lower byte
public static int int3(int a,
int b,
int c)
a - higher byteb - middle part bytec - lower byte
public static int int4(int a,
int b,
int c,
int d)
a - highest byteb - higher middle bytec - lower middle byted - lowest byte
public static int uint2(int a,
int b)
a - higher byteb - lower byte
public static int uint3(int a,
int b,
int c)
a - higher byteb - middle bytec - lower byte
public static double IBM2FLoat(int a,
int b,
int c,
int d)
a - highest byteb - higher bytec - lower byted - lowest byte
public static byte[] Float2IBM(double fVal)
public static byte[] bitVector2ByteVector(int bitVector,
int length)
bitVector - int The bit vector to convert.length - int The number of bits in the vector.
public static double log2(double val)
aFloat - floatpublic static double exp2(double val)
val - double
public static byte[] signedInt2Bytes(int val,
int numBytes)
public static double frexpMant(double val)
public static byte frexpExp(double val)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||