mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 21:00:31 +01:00
Implement 2022 day 15 part 2
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use std::cmp::Ordering;
|
||||
use std::ops::Add;
|
||||
use std::ops::Div;
|
||||
use std::ops::Index;
|
||||
use std::ops::IndexMut;
|
||||
use std::ops::Sub;
|
||||
@@ -202,6 +203,14 @@ impl Sub<Self> for Vec2 {
|
||||
}
|
||||
}
|
||||
|
||||
impl Div<i32> for Vec2 {
|
||||
type Output = Self;
|
||||
|
||||
fn div(self, rhs: i32) -> Self::Output {
|
||||
Self(self.0.map(|v| v / rhs))
|
||||
}
|
||||
}
|
||||
|
||||
impl Index<usize> for Vec2 {
|
||||
type Output = i32;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user