From 27c1ef068a464efb696fdca387f8e320d2c71d4d Mon Sep 17 00:00:00 2001 From: DarthSim Date: Tue, 11 Sep 2018 18:24:16 +0600 Subject: [PATCH] Go <1.10 doesn't have math.Round, ook --- process.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/process.go b/process.go index 38bfebd9..d0855aec 100644 --- a/process.go +++ b/process.go @@ -201,8 +201,8 @@ func calcCrop(width, height int, po processingOptions) (left, top int) { } if po.Gravity.Type == gravityFocusPoint { - pointX := int(math.Round(float64(width) * po.Gravity.X)) - pointY := int(math.Round(float64(height) * po.Gravity.Y)) + pointX := int(float64(width) * po.Gravity.X) + pointY := int(float64(height) * po.Gravity.Y) left = maxInt(0, minInt(pointX-po.Width/2, width-po.Width)) top = maxInt(0, minInt(pointY-po.Height/2, height-po.Height))