(p vg.Path)
| 188 | func (p byLength) Swap(i, j int) { p[i], p[j] = p[j], p[i] } |
| 189 | |
| 190 | func reverseOfPath(p vg.Path) vg.Path { |
| 191 | rp := make(vg.Path, 0, len(p)) |
| 192 | for i := len(p) - 1; i >= 0; i-- { |
| 193 | rp = append(rp, p[i]) |
| 194 | } |
| 195 | rp[0].Type = vg.MoveComp |
| 196 | rp[len(rp)-1].Type = vg.LineComp |
| 197 | |
| 198 | return rp |
| 199 | } |
| 200 | |
| 201 | func circularPermutations(a, b vg.Path) bool { |
| 202 | if len(a) != len(b) { |