룰렛 합계 검증

- Float 값이라 정확히 100.0이 나오지 않으므로 totalPercentage가 99.9보다 크고 100.1보다 작으면 통과되도록 조건 수정
This commit is contained in:
Yu Sung 2024-07-02 22:12:05 +09:00
parent 9f402c8ec8
commit 313af1949e
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ final class RouletteSettingsViewModel: ObservableObject {
}
}
if totalPercentage != Float(100) {
if totalPercentage > Float(100.1) || totalPercentage <= Float(99.99) {
isLoading = false
errorMessage = "확률이 100%가 아닙니다"
isShowErrorPopup = true