4 ms·
> And it almost never matters. I take issue with this. Drift from floating point inaccuracies can compound quickly and dramatically affect results. Sure if you
by Volundr 3y ago
> And it almost never matters.
I take issue with this. Drift from floating point inaccuracies can compound quickly and dramatically affect results. Sure if you're just looping over a 1000 item list, it's not going to matter that JavaScript is representing that as a float/double, but in a wide variety of contexts, such as anything to do with money, it absolutely does matter.
- jsharpe 3y agoAnother example is open world games. They have to keep world coordinates centered on the player because for large worlds, the floating point inaccuracy in the far reaches of the world starts to really matter. An example of a game that does this is Outer Wilds.
- deleted 3y ago[deleted]
- dijksterhuis 3y agocaveat: this is not my direct experience so i might be wrong -- but someone who was doing an different masters project at the same time as mine was doing a mini on-rails video game and mentioned this. apparently it's also because of the "what is up?" question. e.g. in outer wilds ... how do you determine which way is "up" when "up" for the player can be any direction.
- lcuff 3y agoOh for 9999999999999999 pennies! I wouldn't care if I got one less that I was supposed to! :-)