double to long without conversion in Java

前端 未结 1 1911
猫巷女王i
猫巷女王i 2021-01-12 16:49

I need to turn double into long preserving its binary structure, not number value. Just change type, but leave binary value as it is. Is there a native way to do it?

相关标签:
1条回答
  • 2021-01-12 17:26

    There is Double with to doubleToLongBits and doubleToLongRawBits. Javadoc is your friend.

    0 讨论(0)
提交回复
热议问题