r/visualbasic•
Wulf2k

[VB.NET] Support for negative zero floats?

I have a tool that modifies data files for a game and some of the values are "negative 0", aka, &H80000000.

I dump the values to a datagridview, allow the user to modify them, and then save them back. Saving them back saves them as &H00000000. Nothing in the game seems to fail when using a positive zero but there's no way to tell if it's having some sort of subtle effect down the road, and being able to create a byte-perfect match of the original when opening/saving would be nice for bug-testing.

Is there any support for negative floats built into VB, or am I going to have to treat it as a special case when reading/writing to the file?

Posted Jul 31, 2017, 3:22 PM UTC

24
Loading comments…