Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
bakugo
4mo ago
0 comments
Share
The game has ammo pickups that refill 20% and 50% of whatever your max ammo is, so floats have to be involved in there somewhere.
0 comments
default
newest
oldest
manwe150
4mo ago
Dividing by 5 or 2, respectively, are integers, if the game developers wanted them to be. More so because the actual units of ammo need to be integers if they are to render as full bullets each
shultays
4mo ago
Or more generalized "ammo += (maxAmmo * percentageToFill) / 100"
j
/
k
navigate · click thread line to collapse