Java Utililty Methods Float to

List of utility methods to do Float to

Description

The list of methods to do Float to are organized into topic(s).

Method

intfloatToSortableInt(float val)
Converts a float value to a sortable signed int.
return sortableFloatBits(Float.floatToIntBits(val));
intfloatToSortableInt(float value)
Converts a float value to a sortable int.
int bits = Float.floatToIntBits(value);
return bits ^ (bits >> 31) & Integer.MAX_VALUE;
StringfloatToTime(float aTimeDuration)
float To Time
long iPart = (long) aTimeDuration;
double fPart = aTimeDuration - iPart;
String hours = String.valueOf(iPart);
String minutes = String.valueOf((long) (fPart * 60));
if (hours.length() == 1) {
    hours = "0" + hours;
if (minutes.length() == 1) {
...
shortsingle2short(float f)
Converts a Single value to a Short value.
return (short) (((long) f << 48) >> 48);
shortsingle2short(float f)
singleshort
return (short) (((long) f << 48) >> 48);