We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c25f50 commit bb7ff6bCopy full SHA for bb7ff6b
common/src/main/kotlin/com/lambda/util/math/MathUtils.kt
@@ -51,12 +51,6 @@ object MathUtils {
51
return typeConvert(scaled.toDouble())
52
}
53
54
- private fun Double.roundToPlaces(places: Int) =
55
- BigDecimal(this).setScale(places, RoundingMode.HALF_EVEN).toDouble()
56
-
57
- private val Double.decimals: Int
58
- get() = BigDecimal.valueOf(this).scale()
59
60
fun <T : Number> T.typeConvert(valueIn: Double): T {
61
@Suppress("UNCHECKED_CAST")
62
return when (this) {
0 commit comments