Skip to content

Instantly share code, notes, and snippets.

@mkrentovskiy
Created April 21, 2013 16:55
Show Gist options
  • Save mkrentovskiy/5430245 to your computer and use it in GitHub Desktop.
Save mkrentovskiy/5430245 to your computer and use it in GitHub Desktop.
package main
import "code.google.com/p/go-tour/pic"
func Pic(dx, dy int) [][]uint8 {
res := make([][]uint8, dx)
for x := range res {
res[x] = make([]uint8, dy)
for y := range res[x] {
res[x][y] = uint8(x^y + y^x)
}
}
return res
}
func main() {
pic.Show(Pic)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment