Skip to content

Commit

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

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

0 comments on commit 60bf94c

Please sign in to comment.