Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( Math.round((change / Coin.OE.value)*10.0)/10.0 >= 1 ) {
- int oneEuro = (int)(change / Coin.OE.value);
- change = Math.round((change - (oneEuro * Coin.OE.value))*10.0)/10.0;
- //If change is 0.1 or 0.3 at this point, we need to revert what we just did as we will end up in a situation where we cant give all money back
- if (change == 0.1 || change == 0.3) {
- change += Coin.OE.value;
- oneEuro--;
- }
- coinList[1] = (int)oneEuro;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement