Comment

Comment by ajuc

If you don't care about precision use single floats. That's most of the time in games. Some people even used ints as fixed precision fractions.

If you care about precision - doubles still aren't precise - for currency use bigdecimals, for some stuff ratios can give precise results, for irrational things your only options are doubles, but be aware that you aren't precise, even for simply looking operations. No way to compute 10% of something precisely with doubles.

parent ajuc 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton