From 965f74f08bb4d82f03e327c9d4fba63787ecd1fc Mon Sep 17 00:00:00 2001 From: Stanisalv Date: Mon, 14 Sep 2020 12:43:30 +0300 Subject: [PATCH] add TODO in AmountWithDecimalDecorator add TODO in AmountWithDecimalDecorator --- .../touchin/roboswag/views/widget/AmountWithDecimalDecorator.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/views/src/main/java/ru/touchin/roboswag/views/widget/AmountWithDecimalDecorator.kt b/views/src/main/java/ru/touchin/roboswag/views/widget/AmountWithDecimalDecorator.kt index 281b9c6..c14a52f 100644 --- a/views/src/main/java/ru/touchin/roboswag/views/widget/AmountWithDecimalDecorator.kt +++ b/views/src/main/java/ru/touchin/roboswag/views/widget/AmountWithDecimalDecorator.kt @@ -215,6 +215,7 @@ class AmountWithDecimalDecorator( return formatter.format(this.replaceSeparatorsToDot().toDouble().floor()) } + // TODO make it simple private fun Double.floor() = (this * 10f.pow(decimalPartLength)).roundToLong() / 10f.pow(decimalPartLength) }