aboutsummaryrefslogtreecommitdiff
path: root/units.go
diff options
context:
space:
mode:
Diffstat (limited to 'units.go')
-rw-r--r--units.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/units.go b/units.go
index 93c0756..7939c65 100644
--- a/units.go
+++ b/units.go
@@ -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, ",")
+}