floatToSortableInt

Converts a float value to a sortable signed int. The value is converted by getting their IEEE 754 floating-point "float format" bit layout and then some bits are swapped, to be able to compare the result as int. By this the precision is not reduced, but the value can easily be used as an int. The sort order (including ) is defined by Float.compareTo; NaN is greater than positive infinity.

See also

.sortableIntToFloat