Skip to content

Commit

Permalink
score was reverted to safety score
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Nov 9, 2021
1 parent 60bf94c commit 86344eb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions reporthandling/datastructuresmethodshelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ func RemoveResponse(slice []RuleResponse, index int) []RuleResponse {
func percentage(big, small int) int {
if big == 0 {
if small == 0 {
return 0
return 100
}
return 100
return 0
}

return int((float64(small) * 100) / float64(big))
return int(float64(float64(big-small)/float64(big)) * 100)
}

0 comments on commit 86344eb

Please sign in to comment.