From 32514def6432733208a39905ad2ba28fbaddfbaa Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 2 May 2015 22:12:20 +0200 Subject: Make Add a method, add Path type --- cutter.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cutter.go') diff --git a/cutter.go b/cutter.go index a063143..aa97552 100644 --- a/cutter.go +++ b/cutter.go @@ -10,10 +10,12 @@ type Point struct { X, Y int } -func add(a, b Point) Point { - return Point{a.X + b.X, a.Y + b.Y} +func (p Point) Add(u Point) Point { + return Point{p.X + u.X, p.Y + u.Y} } +type Path []Point + /* A4 Cutting area -- cgit v1.2.3