From 1779ac75684ac6c2dcbece9258e5340d2bd35ee5 Mon Sep 17 00:00:00 2001 From: Since <ax20yhum@cip.cs.fau.de> Date: Mon, 13 Nov 2017 18:42:30 +0100 Subject: [PATCH] Fix coordinate translation off-by-one error witnessed by improved translation tests in commit c503d9d778dc0d5ee8c053e56152fb4012b0d04e --- translate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translate.go b/translate.go index e8e7c05..9c9e864 100644 --- a/translate.go +++ b/translate.go @@ -49,8 +49,8 @@ func (c *Composite) calibrateProjection() { // calibrate scaling resx, resy := c.Translate(edgeBottom, edgeRight) - c.Rx = resx / float64(c.Dx-1) - c.Ry = resy / float64(c.Dy-1) + c.Rx = (resx) / float64(c.Dx) + c.Ry = (resy) / float64(c.Dy) } // Translate translates geographical coordinates (latitude north, longitude east) to the -- GitLab