enhanced comment

This commit is contained in:
2025-08-13 11:32:06 +02:00
parent 4434129f1c
commit 2caf663ba7

View File

@@ -137,6 +137,7 @@ public class DrinkingBar {
// berechne Minuten benötigt für 1 Liter
BigDecimal minutesPerLitre = totalMinutesBD.divide(totalLitres, MathContext.DECIMAL64);
// berechne Minuten benötigt bis zum nächsten 0.25er Schritt
// runde auf ganze Zahl, da wir nur ganze Minuten anzeigen und damit 1.999 = 2 Minuten sind
return minutesPerLitre.multiply(litresToNextStep).setScale(0, RoundingMode.HALF_EVEN);
}