summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-02-25 10:02:19 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-02-25 10:02:19 +0100
commitef46ba9c02d395f6c884a3b819810ec394e6759b (patch)
tree57d294ab2fa811c6224a4e0351546ea84dba63f5 /src/main/java/at/hannibal2/skyhanni/utils
parent5917bc9f8ec33f49034c23bcd30047aa048738fb (diff)
downloadskyhanni-ef46ba9c02d395f6c884a3b819810ec394e6759b.tar.gz
skyhanni-ef46ba9c02d395f6c884a3b819810ec394e6759b.tar.bz2
skyhanni-ef46ba9c02d395f6c884a3b819810ec394e6759b.zip
Added support for number abbreviations in /shskills.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt7
1 files changed, 4 insertions, 3 deletions
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(",", "")