rounding <1%

This commit is contained in:
Luc Mcgrady 2025-05-23 15:25:19 +01:00
parent c709cef165
commit 0ba35cb57d
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C

View file

@ -116,8 +116,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
return Math.round(percent / 50) * 50;
} else if (absPercent > 10) {
return Math.round(percent / 5) * 5;
} else {
} else if (absPercent >= 1) {
return parseFloat(percent.toPrecision(1));
} else {
return "<1";
}
}