From 4137f87f2206542515f6165714d785d21f865a5d Mon Sep 17 00:00:00 2001 From: faiface Date: Wed, 5 Jul 2017 19:58:09 +0200 Subject: [PATCH] clarify Rect.Intersect doc --- geometry.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/geometry.go b/geometry.go index 1c61477..3b2b8b3 100644 --- a/geometry.go +++ b/geometry.go @@ -268,6 +268,8 @@ func (r Rect) Union(s Rect) Rect { } // Intersect returns the maximal Rect which is covered by both r and s. Rects r and s must be normalized. +// +// If r and s don't overlap, this function returns R(0, 0, 0, 0). func (r Rect) Intersect(s Rect) Rect { t := R( math.Min(r.Max.X, s.Max.X),