I've got a very odd issue. I run this in the immediate window:
?(System.Convert.ToDouble(2458963.229671001113318401517D))
2458963.229671001
Which is what I expect!
Then, later on in my application, after initializing Managed DirectX, I get the following:
?(System.Convert.ToDouble(2458963.229671001113318401517D))
2458963.25
After I hit that point in my code, forever after System.Convert.ToDouble()
will return truncated and wrong results.
I've isolated the single line that causes this change in System.Convert.ToDouble()
behavior:
new Device(adapterOrdinal, dType, this, flags, m_presentParams);
Which is a Microsoft.DirectX.Direct3D.Device
object, from:
// Assembly: Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
I'm not sure why creating a Microsoft.DirectX.Direct3D.Device
causes a change in how System.Convert.ToDouble()
acts.