summaryrefslogtreecommitdiff
path: root/src/pkg/image/geom.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/image/geom.go')
-rw-r--r--src/pkg/image/geom.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/image/geom.go b/src/pkg/image/geom.go
index e12348331..6ebaf67da 100644
--- a/src/pkg/image/geom.go
+++ b/src/pkg/image/geom.go
@@ -38,7 +38,7 @@ func (p Point) Div(k int) Point {
return Point{p.X / k, p.Y / k}
}
-// In returns whether p is in r.
+// In reports whether p is in r.
func (p Point) In(r Rectangle) bool {
return r.Min.X <= p.X && p.X < r.Max.X &&
r.Min.Y <= p.Y && p.Y < r.Max.Y
@@ -60,7 +60,7 @@ func (p Point) Mod(r Rectangle) Point {
return p.Add(r.Min)
}
-// Eq returns whether p and q are equal.
+// Eq reports whether p and q are equal.
func (p Point) Eq(q Point) bool {
return p.X == q.X && p.Y == q.Y
}
@@ -179,24 +179,24 @@ func (r Rectangle) Union(s Rectangle) Rectangle {
return r
}
-// Empty returns whether the rectangle contains no points.
+// Empty reports whether the rectangle contains no points.
func (r Rectangle) Empty() bool {
return r.Min.X >= r.Max.X || r.Min.Y >= r.Max.Y
}
-// Eq returns whether r and s are equal.
+// Eq reports whether r and s are equal.
func (r Rectangle) Eq(s Rectangle) bool {
return r.Min.X == s.Min.X && r.Min.Y == s.Min.Y &&
r.Max.X == s.Max.X && r.Max.Y == s.Max.Y
}
-// Overlaps returns whether r and s have a non-empty intersection.
+// Overlaps reports whether r and s have a non-empty intersection.
func (r Rectangle) Overlaps(s Rectangle) bool {
return r.Min.X < s.Max.X && s.Min.X < r.Max.X &&
r.Min.Y < s.Max.Y && s.Min.Y < r.Max.Y
}
-// In returns whether every point in r is in s.
+// In reports whether every point in r is in s.
func (r Rectangle) In(s Rectangle) bool {
if r.Empty() {
return true