Skip to content

Commit

Permalink
chore: refactor image to img to not collide with package
Browse files Browse the repository at this point in the history
  • Loading branch information
MM-coder committed Dec 8, 2023
1 parent 3ea97f7 commit 9b821df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ func assertColourEquality(colour1 color.Color, colour2 color.Color) bool {

// generateRandomImage generates a random image of a given width and height.
func generateRandomImage(width, height int) [][][4]uint32 {
image := Make2D[[4]uint32](height, width)
img := Make2D[[4]uint32](height, width)
for y := 0; y < height; y++ {
for x := 0; x < width; x++ {
image[y][x] = [4]uint32{
img[y][x] = [4]uint32{
uint32(rand.Intn(256)), // Red
uint32(rand.Intn(256)), // Green
uint32(rand.Intn(256)), // Blue
uint32(rand.Intn(256)), // Alpha
}
}
}
return image
return img
}

func assertValidMatrix(matrix [][][4]uint32) error {
Expand Down

0 comments on commit 9b821df

Please sign in to comment.