1
0
mirror of https://github.com/golang/go synced 2024-11-22 04:44:39 -07:00

image: use Rectangle{} instead of ZR

ZR is deprecated,
so replace it with the literal Rectangle to represent the zero value.
This commit is contained in:
tomocy 2024-08-29 21:17:12 +09:00
parent 0f003f9d15
commit 850472888d

View File

@ -169,7 +169,7 @@ func (r Rectangle) Intersect(s Rectangle) Rectangle {
//
// if max(r0.Min.X, s0.Min.X) >= min(r0.Max.X, s0.Max.X) || likewiseForY { etc }
if r.Empty() {
return ZR
return Rectangle{}
}
return r
}