Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
donall
· 14y ago · 0 comments
Why are the fruit counts represented as floats?
Comments
[–]
matthiaskramm
14y ago
You can get half a fruit if you and your opponent pick it up at the exact same time.
[–]
epaik
14y ago
They didn't really have a choice in the matter! In JavaScript, all numbers are floats.
[–]
pyrotechnick
14y ago
Incorrect:
http://www.khronos.org/registry/typedarray/specs/latest/
Besides, there's Number.prototype.toFixed().