fixed avg not returning correctly
This commit is contained in:
@@ -82,12 +82,12 @@ func (s *Sprays) Avg() (avg [][]float32) {
|
|||||||
total int
|
total int
|
||||||
)
|
)
|
||||||
|
|
||||||
total++
|
|
||||||
for _, sp := range s.Sprays {
|
for _, sp := range s.Sprays {
|
||||||
for i, r2p := range sp.Spray {
|
for i, r2p := range sp.Spray {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
total++
|
||||||
if len(avg) <= i-1 {
|
if len(avg) <= i-1 {
|
||||||
avg = append(avg, r2p)
|
avg = append(avg, r2p)
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user