use crate::Coord;
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[deprecated(since = "0.1.4", note = "Use `DynamicGrid` instead")]
pub struct Rect {
min: Coord,
max: Coord,
}
impl Rect {
pub fn from_min_max(min: impl Into<Coord>, max: impl Into<Coord>) -> Self {
Self {
min: min.into(),
max: max.into(),
}
}
pub fn coords(self) -> impl Iterator<Item = Coord> {
(self.min.x..=self.max.x)
.flat_map(move |x| (self.min.y..=self.max.y).map(move |y| Coord::new(x, y)))
}
}