From ef46ba9c02d395f6c884a3b819810ec394e6759b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 25 Feb 2024 10:02:19 +0100 Subject: Added support for number abbreviations in /shskills. --- src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt index 4e00a85e7..6deee85bc 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt @@ -3,8 +3,6 @@ package at.hannibal2.skyhanni.utils import java.text.NumberFormat import java.util.Locale import java.util.TreeMap -import kotlin.math.max -import kotlin.math.min import kotlin.math.pow import kotlin.math.roundToInt @@ -190,7 +188,10 @@ object NumberUtil { } // TODO create new function formatLong, and eventually deprecate this function. - fun String.formatNumber(): Long = formatDouble().toLong() + @Deprecated("renamed", ReplaceWith("this.formatLong()")) + fun String.formatNumber(): Long = formatLong() + + fun String.formatLong(): Long = formatDouble().toLong() fun String.formatDouble(): Double { var text = lowercase().replace(",", "") -- cgit