룰렛 합계 검증
- Float 값이라 정확히 100.0이 나오지 않으므로 totalPercentage가 99.9보다 크고 100.1보다 작으면 통과되도록 조건 수정
This commit is contained in:
parent
9f402c8ec8
commit
313af1949e
|
@ -145,7 +145,7 @@ final class RouletteSettingsViewModel: ObservableObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if totalPercentage != Float(100) {
|
if totalPercentage > Float(100.1) || totalPercentage <= Float(99.99) {
|
||||||
isLoading = false
|
isLoading = false
|
||||||
errorMessage = "확률이 100%가 아닙니다"
|
errorMessage = "확률이 100%가 아닙니다"
|
||||||
isShowErrorPopup = true
|
isShowErrorPopup = true
|
||||||
|
|
Loading…
Reference in New Issue