DeltaPriceRound
Magento\SalesRule\Model\DeltaPriceRound
What it does
This class handles precise price rounding for sales rules by tracking rounding deltas across multiple operations.
It prevents cumulative rounding errors when applying discounts or calculating prices by carrying forward the difference between the actual and rounded values.
Developers use this to ensure accurate price calculations, especially when applying multiple discounts or calculating line item totals.
Public Methods
- _resetState()
- round()
- resetAll()
- reset()