top | item 22357577

(no title)

Scirra_Tom | 6 years ago

I really don't see any need or benefit in storing values as mills unless you're writing forex trading platforms. It's inviting more mistakes.

discuss

order

beatgammit|6 years ago

Yeah, nobody is going to notice or care about an error of a cent or two for something like retail, especially if it evens out in the long run. It matters for finance, not for stuff like Uber or Amazon. Just make sure you render it properly on the front end and nobody will care whether you use floats, ints, or decimals. Be consistent in the back end and careful in the front end, ideally with standard functions for translations.