From 23168ee324ccba259b1aad6a84f86349a44fd1ef Mon Sep 17 00:00:00 2001
From: Ben Cragg <bcvery1@gmail.com>
Date: Tue, 29 Jan 2019 11:34:59 +0000
Subject: [PATCH] remove local var

---
 geometry.go | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/geometry.go b/geometry.go
index 80682ab..882a282 100644
--- a/geometry.go
+++ b/geometry.go
@@ -483,15 +483,12 @@ func (c Circle) Intersect(d Circle) Circle {
 //  - An edge of the Rect is a tangent to the Circle
 func (c Circle) IntersectsRect(r Rect) bool {
 	// Checks if the c.Center is not in the diagonal quadrants of the rectangle
-	var grownR Rect
 	if (r.Min.X <= c.Center.X && c.Center.X <= r.Max.X) || (r.Min.Y <= c.Center.Y && c.Center.Y <= r.Max.Y) {
 		// 'grow' the Rect by c.Radius in each diagonal
-		grownR = Rect{
+		return Rect{
 			Min: r.Min.Sub(V(c.Radius, c.Radius)),
 			Max: r.Max.Add(V(c.Radius, c.Radius)),
-		}
-
-		return grownR.Contains(c.Center)
+		}.Contains(c.Center)
 	}
 	// The center is in the diagonal quadrants
 	return c.Center.To(r.Min).Len() <= c.Radius || c.Center.To(r.Max).Len() <= c.Radius
-- 
GitLab