selection tool (selections are not useful yet)

This commit is contained in:
Crispy 2024-10-07 15:11:53 +02:00
parent 92d540c29b
commit 49917d18a9
6 changed files with 63 additions and 15 deletions

View file

@ -16,6 +16,20 @@ impl Pos {
y: self.y as f32,
}
}
pub fn min(self, other: Self) -> Self {
Self {
x: self.x.min(other.x),
y: self.y.min(other.y),
}
}
pub fn max(self, other: Self) -> Self {
Self {
x: self.x.max(other.x),
y: self.y.max(other.y),
}
}
}
impl From<(usize, usize)> for Pos {