diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2016-09-24 00:03:29 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2016-09-24 00:03:29 +0200 |
commit | 16415e31ff390fe106017e3e7fc5c692674bdcbf (patch) | |
tree | 67e7891e30167553492550bd8522dd3e58d7eb2f /units.go | |
parent | c231f3cce3b20ed1b6a43d631ae2a779d15d78b7 (diff) |
Path stringer
Diffstat (limited to 'units.go')
-rw-r--r-- | units.go | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1,6 +1,9 @@ package robo -import "fmt" +import ( + "fmt" + "strings" +) const ( MM = Unit(20.0) @@ -63,3 +66,11 @@ func parseTriple(s string) (t Triple) { } type Path []Point + +func (p Path) String() string { + pp := make([]string, len(p)) + for i, pt := range p { + pp[i] = pt.String() + } + return strings.Join(pp, ",") +} |