aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
index 91430d923..b85250841 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
@@ -121,10 +121,8 @@ object LorenzUtils {
fun formatInteger(l: Long): String = NumberFormat.getIntegerInstance().format(l)
- fun formatDouble(d: Double, format: String?): String =
- NumberFormat.getNumberInstance().format(d)
-
- fun formatDouble(d: Double): String = formatDouble(d, "#,##0.0")
+ fun formatDouble(d: Double, round: Int = 1): String =
+ NumberFormat.getNumberInstance().format(d.round(round))
fun consoleLog(text: String) {
SkyHanniMod.consoleLog(text)