Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ public TpsFormatter(@NotNull final String lowColor, @NotNull final String medium
}

/**
* Round the tps and append a {@code *} before if the value is higher than 20.0
* Round the tps to the nearest tenth and append a {@code *} before if the value is higher than 20.0
*
* @param tps tps
* @return tps rounded
* @return tps rounded to the nearest tenth
*/
private @NotNull String round(final double tps) {
final double finalTps = Math.min(Math.round(tps), 20.0);
final double finalTps = Math.min(Math.round(tps * 10.0) / 10.0, 20.0);
return (tps > 20.0 ? "*" : "") + finalTps;
}

Expand Down