* @return Byte swapped representation.
*/
public static float swap(float value) {
- int intValue = Float.floatToIntBits(value);
+ int intValue = Float.floatToRawIntBits(value);
intValue = swap(intValue);
return Float.intBitsToFloat(intValue);
}
* @return Byte swapped representation.
*/
public static double swap(double value) {
- long longValue = Double.doubleToLongBits(value);
+ long longValue = Double.doubleToRawLongBits(value);
longValue = swap(longValue);
return Double.longBitsToDouble(longValue);
}