aboutsummaryrefslogtreecommitdiff
path: root/robo.go
diff options
context:
space:
mode:
Diffstat (limited to 'robo.go')
-rw-r--r--robo.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/robo.go b/robo.go
index 50e15be..fb4b21d 100644
--- a/robo.go
+++ b/robo.go
@@ -49,6 +49,17 @@ func (p Point) SearchMarksManual(c *bufio.ReadWriter) bool {
return parseUnit(recv(c.Reader)) == 0
}
+func (p Point) Scale(f Unit) Point {
+ return Point{p.X * f, p.Y * f}
+}
+
+func (ph Path) Scale(f Unit) (ret Path) {
+ for _, p := range ph {
+ ret = append(ret, p.Scale(f))
+ }
+ return
+}
+
func (ph Path) send(c *bufio.Writer, a ...interface{}) {
fmt.Fprint(c, a...)
for _, p := range ph {