Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- //"fmt"
- "tour/pic"
- //"math"
- )
- func Pic(dx, dy int) [][]uint8 {
- retval := make([][]uint8, dy)
- for i:=0; i < dy; i++ {
- temp := make([]uint8, dx)
- for j:=0; j < dx; j++ {
- temp[j] = uint8((i+j)/2)
- }
- retval[i] = temp
- }
- return retval
- }
- func main() {
- pic.Show(Pic)
- }
Add Comment
Please, Sign In to add comment