diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2015-05-06 15:07:41 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2015-05-06 15:07:41 +0200 |
commit | fbe34fac1e62617cd9d160e41f6730c550d95580 (patch) | |
tree | 88cfbc0030c322f380afd5046a4cd932b40938c6 /pic.go | |
parent | e5f857994fd8239f3ac0f7e1de7181e628d8a059 (diff) |
Add units
Diffstat (limited to 'pic.go')
-rw-r--r-- | pic.go | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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) } } |