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.
Proposal Details
It is very common to process an image from top left to bottom right. I propose adding this method to
Rectangle:We may also want to add iterators for other directions, such as BRTL.