Skip to content

Commit

Permalink
Fixed percentage reporting in ArcProgressIndicator.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemmermann committed Dec 2, 2024
1 parent 8774bb9 commit cdc2c1c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ public String toString(Double progress) {
if (progress == 1.0) {
return "Completed";
}
return String.format("%.0f%%", progress * 100);

int percent = (int) Math.floor(progress * 100); // make sure 99.8 becomes 99%, not 100%.
return percent + "%";
}

@Override
Expand Down

0 comments on commit cdc2c1c

Please sign in to comment.