use format not silly round stuff

This commit is contained in:
dordsor21 2020-10-09 17:29:05 +01:00
parent 925978db8f
commit 76b992509b
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -106,7 +106,7 @@ public class DefaultProgressSubscriber implements ProgressSubscriber {
if (cancelled.get()) {
task.cancel();
}
actor.sendMessage(caption, Template.of("progress", String.valueOf((double) Math.round(this.progress.doubleValue() * 10000) / 100)));
actor.sendMessage(caption, Template.of("progress", String.format("%.2f", this.progress.doubleValue() * 100)));
}, interval), wait);
}
}