Skip to content

Commit

Permalink
fix(report): add to slice using indexes for histogram report (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramilexe committed Jun 18, 2024
1 parent 2325ed9 commit 757d11e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ninjabot.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ func (n *NinjaBot) Summary() {
fmt.Println("------ RETURN -------")
totalReturn := 0.0
returnsPercent := make([]float64, len(returns))
for _, p := range returns {
returnsPercent = append(returnsPercent, p*100)
for i, p := range returns {
returnsPercent[i] = p * 100
totalReturn += p
}
hist := histogram.Hist(15, returnsPercent)
Expand Down

0 comments on commit 757d11e

Please sign in to comment.