Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
manwe150
· 1y ago · 0 comments
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
Comments
[–]
shultays
1y ago
Or more generalized "ammo += (maxAmmo * percentageToFill) / 100"