aboutsummaryrefslogtreecommitdiff
path: root/pic.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-06 15:07:41 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-06 15:07:41 +0200
commitfbe34fac1e62617cd9d160e41f6730c550d95580 (patch)
tree88cfbc0030c322f380afd5046a4cd932b40938c6 /pic.go
parente5f857994fd8239f3ac0f7e1de7181e628d8a059 (diff)
Add units
Diffstat (limited to 'pic.go')
-rw-r--r--pic.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/pic.go b/pic.go
index 7a0a690..605818d 100644
--- a/pic.go
+++ b/pic.go
@@ -10,8 +10,6 @@ import (
type Page []Path
-const scale = 24.5 * 20
-
func truncate(f float64) float64 {
return float64(int(f*100)) / 100
}
@@ -21,8 +19,8 @@ func parseLine(s string) (pa Path) {
for _, p := range strings.Split(s[10:], " to ") {
var po Point
fmt.Sscanf(p, "%v,%v", &po.Y, &po.X)
- po.X = truncate(5440 - po.X*scale)
- po.Y = truncate(po.Y * scale)
+ po.X = truncate(5440 - po.X*Inch)
+ po.Y = truncate(po.Y * Inch)
pa = append(pa, po)
}
}