(shapes []Shape)
| 7 | } |
| 8 | |
| 9 | func BoxForShapes(shapes []Shape) Box { |
| 10 | if len(shapes) == 0 { |
| 11 | return Box{} |
| 12 | } |
| 13 | box := shapes[0].BoundingBox() |
| 14 | for _, shape := range shapes { |
| 15 | box = box.Extend(shape.BoundingBox()) |
| 16 | } |
| 17 | return box |
| 18 | } |
| 19 | |
| 20 | func BoxForTriangles(shapes []*Triangle) Box { |
| 21 | if len(shapes) == 0 { |
no test coverage detected