开发者

How do I convert the bits in a ulong into a double?

开发者 https://www.devze.com 2023-01-27 22:44 出处:网络
I\'m looking for a C# equivalent to Java\'s Double.longBitsToDouble method. I have a double value stored in a ulong and I want those bits to be converted 开发者_开发知识库to represent a double. Is the

I'm looking for a C# equivalent to Java's Double.longBitsToDouble method. I have a double value stored in a ulong and I want those bits to be converted 开发者_开发知识库to represent a double. Is there an easy way to do this in C#?


Here you go: http://msdn.microsoft.com/en-us/library/system.bitconverter.aspx


you may want to look it

  BitConverter.ToDouble()
0

精彩评论

暂无评论...
验证码 换一张
取 消