EDIT
Let us analyse the use of this function by applying it into a real time example. Suppose I have a product in cart which is taxable. The quantity that I am going to purchase be, 5. After applying tax, the prdouct has a price $10.5356. So this is my situation
CART
-------
Product A
- Price (including tax) - 10.5356
- Quantity - 5
- Tax Rule - Apply tax for each product. Then calculate the total price according to the quantity purchased.
So now let us calculate the real price that is going to produce in this situation. It will be
Total = 10.5356 x 5 = 52.678
Now let us assume, magento does not using _deltaRound()
method. It just rounds product price upto two decimal places and then calculates total price. In this case, product price will get rounded to 10.54
and hence total price would be
Total = 10.54 x 5 = 52.7
Now let us assume magento is using _deltaRound()
method and this function actually rounds product price to two decimal. Along with that it will keep a delta value, which is in fact the difference between actual price and rounded price, will use for calculating rounded price later. Here
Total = 10.54+10.53+10.54+10.53+10.54 = 52.68
That means _deltaRound()
method actually make tax price rounding more accurate to the actrual tax pricing. As you stated this method returns different round value depends upon the delta value. This delta value actually makes tax rounding more accurate.
Note : This is my openion and overview. It may or may not be true. However it seems accurate and logical for me.
Thanks.