I'm sure I was just asked this question a minute ago :lol:

More or less, yes. The game almost never calculates fractions at all. It was written in 1999, back then computers' integer math was much faster than floating point (nowadays there isn't much between them) and D2 has to work out a lot of stuff each frame. So it was designed to always use integers.

When you divide an integer by an integer to get another integer, you round down. Strictly speaking, you never even get the fraction you are rounding, you quite simply say: 10/3 = 3. Three 3s fit inside 10, 4 don't.

So to work out whether to round up or down in D2 you need to know exactly how the formula is written. Whenever a percentage is used, eg here we have 5%, Diablo is actually multiplying by 5 then dividing by 100. So 5% of 7 is 7*5 = 35 then 35/100 = 0. It never even gets to 7.35 and then rounds, it simply thinks 5% of 7 is nothing.

You need to be careful though sometimes. In another thread I used a formula:

chance = base - [(ilvl - qlvl) / divisor]

Without caring what those numbers actually mean, the point is that the division is followed by a subtraction, so you round the division down, but that means you subtract less, so the final answer is more - so overall it looks like rounding up. To get it right you really have to go step by step.

One thing you can be 100% sure of is that D2 never rounds 0.51 up and 0.49 down. It is always truncation of the entire fraction.