From 14d11a1fc8ffef7ae3b21d940a802ba94783fed9 Mon Sep 17 00:00:00 2001 From: rybakovi Date: Mon, 5 Oct 2020 14:28:29 +0300 Subject: [PATCH] float to double --- .../touchin/roboswag/views/widget/AmountWithDecimalDecorator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c14a52f..526f5a1 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 @@ -216,6 +216,6 @@ class AmountWithDecimalDecorator( } // TODO make it simple - private fun Double.floor() = (this * 10f.pow(decimalPartLength)).roundToLong() / 10f.pow(decimalPartLength) + private fun Double.floor() = (this * 10.0.pow(decimalPartLength)).roundToLong() / 10.0.pow(decimalPartLength) }