PBug90 / w3gjs

A native JavaScript WarCraft 3 replay parser implementation.
MIT License
44 stars 17 forks source link

Represent floats like the game does with three digit precision after the comma #100

Open PBug90 opened 2 years ago

PBug90 commented 2 years ago

Floats seem to be single precision IEEE floats, but the actual value used in game appears to be rounded to the third digit after the comma, e.g. the point

( -3153.615966796875 | -4017.91357421875) is represented ingame as (-3153.616 | -4017.914).

This can be observed in the World Editor aswell.

Maybe it would make sense to update the parser to use this kind of precision aswell.