{"action":"opened","issue":{"url":"https://api.github.com/repos/fogleman/primitive/issues/18","repository_url":"https://api.github.com/repos/fogleman/primitive","labels_url":"https://api.github.com/repos/fogleman/primitive/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/fogleman/primitive/issues/18/comments","events_url":"https://api.github.com/repos/fogleman/primitive/issues/18/events","html_url":"https://github.com/fogleman/primitive/issues/18","id":179080363,"number":18,"title":"Edge case bug?","user":{"login":"lolilolicon","id":156613,"avatar_url":"https://avatars.githubusercontent.com/u/156613?v=3","gravatar_id":"","url":"https://api.github.com/users/lolilolicon","html_url":"https://github.com/lolilolicon","followers_url":"https://api.github.com/users/lolilolicon/followers","following_url":"https://api.github.com/users/lolilolicon/following{/other_user}","gists_url":"https://api.github.com/users/lolilolicon/gists{/gist_id}","starred_url":"https://api.github.com/users/lolilolicon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lolilolicon/subscriptions","organizations_url":"https://api.github.com/users/lolilolicon/orgs","repos_url":"https://api.github.com/users/lolilolicon/repos","events_url":"https://api.github.com/users/lolilolicon/events{/privacy}","received_events_url":"https://api.github.com/users/lolilolicon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-25T10:57:47Z","updated_at":"2016-09-25T10:57:47Z","closed_at":null,"body":"Looks like `0` is passed to `Intn`?\r\n```\r\npanic: invalid argument to Intn\r\n\r\ngoroutine 8 [running]:\r\npanic(0x539800, 0xc42000edb0)\r\n\t/usr/lib/go/src/runtime/panic.go:500 +0x1a1\r\nmath/rand.(*Rand).Intn(0xc4200104a0, 0x0, 0x0)\r\n\t/usr/lib/go/src/math/rand/rand.go:116 +0xd0\r\ngithub.com/fogleman/primitive/primitive.NewRandomEllipse(0x1, 0x1, 0xc4200104a0, 0x0)\r\n\t/usr/lib/go/src/github.com/fogleman/primitive/primitive/ellipse.go:22 +0x8d\r\ngithub.com/fogleman/primitive/primitive.(*Model).RandomState(0xc420072210, 0xc420018600, 0x3, 0x80, 0xc4200104a0, 0x20)\r\n\t/usr/lib/go/src/github.com/fogleman/primitive/primitive/model.go:198 +0x3bd\r\ngithub.com/fogleman/primitive/primitive.(*Model).BestRandomState(0xc420072210, 0xc420018600, 0x3, 0x80, 0x64, 0xc4200104a0, 0x0)\r\n\t/usr/lib/go/src/github.com/fogleman/primitive/primitive/model.go:179 +0x7e\r\ngithub.com/fogleman/primitive/primitive.(*Model).BestHillClimbState(0xc420072210, 0xc420018600, 0x3, 0x80, 0x64, 0x64, 0x2, 0xc4200104a0, 0x0)\r\n\t/usr/lib/go/src/github.com/fogleman/primitive/primitive/model.go:162 +0xcf\r\ngithub.com/fogleman/primitive/primitive.(*Model).runWorker(0xc420072210, 0x3, 0x80, 0x64, 0x64, 0x2, 0xc42005a180)\r\n\t/usr/lib/go/src/github.com/fogleman/primitive/primitive/model.go:154 +0x234\r\ncreated by github.com/fogleman/primitive/primitive.(*Model).runWorkers\r\n\t/usr/lib/go/src/github.com/fogleman/primitive/primitive/model.go:136 +0x13b\r\n```"}}
{"actor":{"display_login":"lolilolicon"}}