From 753f303978ce414ddc50053bcb6ba393c4d2a155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Gim=C3=A9nez?= Date: Sun, 5 May 2024 12:21:41 +0900 Subject: [PATCH] we should not ceil the value --- pkg/nip/rule.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/nip/rule.go b/pkg/nip/rule.go index 4cc985f..131b42a 100644 --- a/pkg/nip/rule.go +++ b/pkg/nip/rule.go @@ -2,7 +2,6 @@ package nip import ( "fmt" - "math" "regexp" "slices" "strconv" @@ -217,7 +216,5 @@ func (r Rule) calculateEnhancedDefense(i data.Item) int { return 0 } - res := float64(defenseStat.Value-itemTypeMaxDefense) / float64(itemTypeMaxDefense) * 100 - - return int(math.Ceil(res)) + return int(float64(defenseStat.Value-itemTypeMaxDefense) / float64(itemTypeMaxDefense) * 100) }