重量显示优化
This commit is contained in:
@@ -175,7 +175,9 @@ fun View.clickWithDebounce(delay: Long = 300, action: () -> Unit) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Double.roundedDecimalPlace(num: Int): Double {
|
||||
return BigDecimal(this).setScale(num, RoundingMode.HALF_UP).toDouble()
|
||||
}
|
||||
fun Double.roundedOneDecimalPlace(): Double {
|
||||
return BigDecimal(this).setScale(1, RoundingMode.HALF_UP).toDouble()
|
||||
return this.roundedDecimalPlace(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user