Package com.jogamp.common.util
Class ValueConv
java.lang.Object
com.jogamp.common.util.ValueConv
Utility class providing simple signed and unsigned primitive value conversions
for byte, short, int, float and double.
Non float to non float conversions are handled via float or double, depending on the value range.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final doublebyte_to_double(byte v, boolean sSigned) static final floatbyte_to_float(byte v, boolean sSigned) static final intbyte_to_int(byte v, boolean sSigned, boolean dSigned) static final shortbyte_to_short(byte v, boolean sSigned, boolean dSigned) static final bytedouble_to_byte(double v, boolean dSigned) static final intdouble_to_int(double v, boolean dSigned) static final shortdouble_to_short(double v, boolean dSigned) static final bytefloat_to_byte(float v, boolean dSigned) static final intfloat_to_int(float v, boolean dSigned) static final shortfloat_to_short(float v, boolean dSigned) static final byteint_to_byte(int v, boolean sSigned, boolean dSigned) static final doubleint_to_double(int v, boolean sSigned) static final floatint_to_float(int v, boolean sSigned) static final shortint_to_short(int v, boolean sSigned, boolean dSigned) static final byteshort_to_byte(short v, boolean sSigned, boolean dSigned) static final doubleshort_to_double(short v, boolean sSigned) static final floatshort_to_float(short v, boolean sSigned) static final intshort_to_int(short v, boolean sSigned, boolean dSigned)
-
Constructor Details
-
ValueConv
public ValueConv()
-
-
Method Details
-
float_to_byte
public static final byte float_to_byte(float v, boolean dSigned) -
float_to_short
public static final short float_to_short(float v, boolean dSigned) -
float_to_int
public static final int float_to_int(float v, boolean dSigned) -
double_to_byte
public static final byte double_to_byte(double v, boolean dSigned) -
double_to_short
public static final short double_to_short(double v, boolean dSigned) -
double_to_int
public static final int double_to_int(double v, boolean dSigned) -
byte_to_float
public static final float byte_to_float(byte v, boolean sSigned) -
byte_to_double
public static final double byte_to_double(byte v, boolean sSigned) -
short_to_float
public static final float short_to_float(short v, boolean sSigned) -
short_to_double
public static final double short_to_double(short v, boolean sSigned) -
int_to_float
public static final float int_to_float(int v, boolean sSigned) -
int_to_double
public static final double int_to_double(int v, boolean sSigned) -
byte_to_short
public static final short byte_to_short(byte v, boolean sSigned, boolean dSigned) -
byte_to_int
public static final int byte_to_int(byte v, boolean sSigned, boolean dSigned) -
short_to_byte
public static final byte short_to_byte(short v, boolean sSigned, boolean dSigned) -
short_to_int
public static final int short_to_int(short v, boolean sSigned, boolean dSigned) -
int_to_byte
public static final byte int_to_byte(int v, boolean sSigned, boolean dSigned) -
int_to_short
public static final short int_to_short(int v, boolean sSigned, boolean dSigned)
-