Skip to content

Commit

Permalink
Simplify slice init to fix lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrks committed Jan 2, 2021
1 parent bb11ac5 commit 2efd552
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ func Encode(xComponents, yComponents int, img image.Image) (hash string, err err
}

// vector of yComponents*xComponents*(RGB)
factors := make([][][3]float64, yComponents, yComponents)
factors := make([][][3]float64, yComponents)
for y := 0; y < yComponents; y++ {
factors[y] = make([][3]float64, xComponents, xComponents)
factors[y] = make([][3]float64, xComponents)
for x := 0; x < xComponents; x++ {
factor := multiplyBasisFunction(x, y, img)
factors[y][x][0] = factor[0]
Expand Down

0 comments on commit 2efd552

Please sign in to comment.