Quote:
Originally Posted by Fifi
Hi,
Long time I wonder why some ships zone box armor are -1 and some are -1,0003…
-1 refer directly to the armor of zone.Cfg file, but -1,0003 ?? 
Even stock files are set this way, both settings for same ship zon, but GWX for instance seems to have all ships zone box set to -1…
Don’t catch out why -1,0003
If someone could enlighten me…
|
As an example open unmoded SH3v14 NBB_Bismark.zon in S3D.
Change first found Box ArmorLevel from -1,00003 to something else.
Change it back to -1,00003.
Save As file maybe as NBB_Bismark.zon1.zon right next to the original.
Compare both files HEX-values of the ArmorLevel in a HEX-Editor.
The representation has been changed! Original is FF 00 80 BF; the new is FC 00 80 BF.
Hint: S3D will change Positions somewhat, so the found Position in the new saved file is different.
Why is that? Is S3D broken? -- No!
It must have been to do with the Nature of Floating-Point-Arithmetic.
Think of the number Pi, there will never be an exact representation. When you press such a number into only four HEX-bytes, which represents so called System-Single or only Single (as of Single-Precision), or MS calls it Float, it can only be presented by rounding.
So there is some more Hex-values means the same, it depends from the calculation-method you use.
j2c