30.11.2016, 10:36
Infinity isn't -0.0.
-0.0 is exactly the same as 0.0. GTA will see anything at 0.0 or lower as dead (-0.0 could as well be -0.000000001 due to rounding errors).
If you draw a line and put numbers above it, ranging from -20.0 to +20.0, you'll see that -0.0 and 0.0 overlap.
... -5 -4 -3 -2 -1 0 1 2 3 4 5 ...
Like this.
Also, 0x7F800000 isn't the highest value and certainly isn't the same as -0.0.
The highest value for a 32-bit signed integer is 0x7FFFFFFF, which is the same as 2147483647.
If you add 1 to that value, it will flip negative to 0x80000000 (or -2147483648 ).
Just set it to some high value (like 1000000 or so), you can't reach infinity with binary values anyways.
-0.0 is exactly the same as 0.0. GTA will see anything at 0.0 or lower as dead (-0.0 could as well be -0.000000001 due to rounding errors).
If you draw a line and put numbers above it, ranging from -20.0 to +20.0, you'll see that -0.0 and 0.0 overlap.
... -5 -4 -3 -2 -1 0 1 2 3 4 5 ...
Like this.
Also, 0x7F800000 isn't the highest value and certainly isn't the same as -0.0.
The highest value for a 32-bit signed integer is 0x7FFFFFFF, which is the same as 2147483647.
If you add 1 to that value, it will flip negative to 0x80000000 (or -2147483648 ).
Just set it to some high value (like 1000000 or so), you can't reach infinity with binary values anyways.