-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposal
Milestone
Description
Proposal Details
It is very common to process an image from top left to bottom right. I propose adding this method to Rectangle:
func (r Rectangle) TLBR() iter.Seq[Point] {
r = r.Canon()
return func(yield func(Point) bool) {
for y := r.Min.Y; y < r.Max.Y; y++ {
for x := r.Min.X; x < r.Max.X; x++ {
if !yield(Pt(x, y)) {
return
}
}
}
}
}We may also want to add iterators for other directions, such as BRTL.
apparentlymart
Metadata
Metadata
Assignees
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposal