aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-07-29 19:17:36 +0200
committerDimitri Sokolyuk <demon@dim13.org>2019-07-29 19:17:36 +0200
commitd04f4103d2887a6b3c8e7cc60386cdc94c8cc92d (patch)
tree0795eace941da40f1438c6feddb160d37808cb91
parenta99115a853fe1d4470047affabadc1c737de231d (diff)
switch to image.Point
-rw-r--r--hershey.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/hershey.go b/hershey.go
index bfe31fb..d886f33 100644
--- a/hershey.go
+++ b/hershey.go
@@ -3,16 +3,14 @@ package main
import (
"bufio"
"fmt"
+ "image"
"log"
"os"
"strconv"
"strings"
)
-type Point struct {
- X, Y int
-}
-
+type Point image.Point
type Path []Point
type Set []Path
@@ -46,8 +44,8 @@ func parseData(s string) Set {
var ph Path
for n := 0; n < len(el); n += 2 {
p := Point{
- Y: parsePoint(el[n]),
X: parsePoint(el[n+1]),
+ Y: parsePoint(el[n]),
}
ph = append(ph, p)
}