(worker *Worker)
| 85 | } |
| 86 | |
| 87 | func NewRandomRotatedRectangle(worker *Worker) *RotatedRectangle { |
| 88 | rnd := worker.Rnd |
| 89 | x := rnd.Intn(worker.W) |
| 90 | y := rnd.Intn(worker.H) |
| 91 | sx := rnd.Intn(32) + 1 |
| 92 | sy := rnd.Intn(32) + 1 |
| 93 | a := rnd.Intn(360) |
| 94 | r := &RotatedRectangle{worker, x, y, sx, sy, a} |
| 95 | r.Mutate() |
| 96 | return r |
| 97 | } |
| 98 | |
| 99 | func (r *RotatedRectangle) Draw(dc *gg.Context, scale float64) { |
| 100 | sx, sy := float64(r.Sx), float64(r.Sy) |
no test coverage detected
searching dependent graphs…