Always floor buffer value to avoid fractional display

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Simon Kühn 2026-05-06 19:12:35 +02:00
parent 4e1028e1a1
commit bd0190cfde

View file

@ -230,7 +230,7 @@ function calc(g){
var pd=Math.ceil(remaining/Math.max(1,dl)); var pd=Math.ceil(remaining/Math.max(1,dl));
var st=Math.max(0,pd-tdone); var st=Math.max(0,pd-tdone);
var expectedPast=Math.min(t,g.days)*g.daily; var expectedPast=Math.min(t,g.days)*g.daily;
var buf=(past-expectedPast)+Math.max(0,tdone-g.daily); var buf=Math.floor((past-expectedPast)+Math.max(0,tdone-g.daily));
var deficit=Math.min(0,buf); var deficit=Math.min(0,buf);
var surplus=Math.max(0,buf); var surplus=Math.max(0,buf);
var dailyDelta=pd-g.daily; var dailyDelta=pd-g.daily;