(worker *Worker)
| 14 | } |
| 15 | |
| 16 | func NewRandomRectangle(worker *Worker) *Rectangle { |
| 17 | rnd := worker.Rnd |
| 18 | x1 := rnd.Intn(worker.W) |
| 19 | y1 := rnd.Intn(worker.H) |
| 20 | x2 := clampInt(x1+rnd.Intn(32)+1, 0, worker.W-1) |
| 21 | y2 := clampInt(y1+rnd.Intn(32)+1, 0, worker.H-1) |
| 22 | return &Rectangle{worker, x1, y1, x2, y2} |
| 23 | } |
| 24 | |
| 25 | func (r *Rectangle) bounds() (x1, y1, x2, y2 int) { |
| 26 | x1, y1 = r.X1, r.Y1 |
no test coverage detected
searching dependent graphs…