Skip to content

Commit 3d0a549

Browse files
committed
Crash fix
1 parent cb519a2 commit 3d0a549

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

common/src/main/kotlin/com/lambda/util/math/MathUtils.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ object MathUtils {
5959
private fun decimalPlaces(value: Double) = BigDecimal.valueOf(value).scale()
6060

6161
fun random(v1: Double, v2: Double): Double {
62+
if (v1 == v2) return v1
6263
val min = min(v1, v2)
6364
val max = max(v1, v2)
6465
return nextDouble(min, max)

0 commit comments

Comments
 (0)