Skip to content

Commit 03565b7

Browse files
committed
hotfix: 퍼센트 계산 수식 변경 및 출시
1 parent c59ac57 commit 03565b7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010
defaultConfig {
1111
applicationId = "com.withpeace.withpeace"
1212
targetSdk = 34
13-
versionCode = 17
14-
versionName = "2.3.2"
13+
versionCode = 18
14+
versionName = "2.3.3"
1515

1616
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1717
vectorDrawables {

core/domain/src/main/java/com/withpeace/withpeace/core/domain/model/balancegame/BalanceGame.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ data class BalanceGame(
1919
) {
2020
fun getAPercentage(): Int {
2121
val totalSum = optionACount.toDouble() + optionBCount.toDouble()
22-
22+
if(id== 7L) {
23+
println(totalSum)
24+
}
2325
if (totalSum == 0.0) {
2426
return 0
2527
}
26-
return ((optionACount.toDouble() / totalSum) * 100).roundToInt()
28+
return ((optionACount*100.toDouble() / totalSum)).roundToInt()
2729
}
2830

2931
fun getBPercentage(): Int {

0 commit comments

Comments
 (0)