From feacd128684ba3e83ee5f96655c536e2731296e8 Mon Sep 17 00:00:00 2001 From: grigoriiioffe Date: Wed, 8 Mar 2023 21:40:17 +0200 Subject: [PATCH] Code formatting --- .../main/java/com/keylesspalace/tusky/util/NumberUtils.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/util/NumberUtils.kt b/app/src/main/java/com/keylesspalace/tusky/util/NumberUtils.kt index 128a95f1af..05ca6d6a93 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/NumberUtils.kt +++ b/app/src/main/java/com/keylesspalace/tusky/util/NumberUtils.kt @@ -2,11 +2,10 @@ package com.keylesspalace.tusky.util import java.text.DecimalFormat - -fun shortNumber(number: Number) : String { +fun shortNumber(number: Number): String { val array = arrayOf(' ', 'k', 'M', 'B', 'T', 'P', 'E') val value = Math.floor(Math.log10(number.toDouble())).toInt() - val base = value / 3 + val base = value / 3 if (value >= 3 && base < array.size) { return DecimalFormat("#0.0").format(number.toDouble() / Math.pow(10.0, (base * 3).toDouble())) + array[base] } else {