Implement AddAssign for Point

This commit is contained in:
Hanno Braun 2023-02-15 11:57:38 +01:00
parent f835ba0cf5
commit 8fc40594a7

View File

@ -164,6 +164,15 @@ where
}
}
impl<V, const D: usize> ops::AddAssign<V> for Point<D>
where
V: Into<Vector<D>>,
{
fn add_assign(&mut self, rhs: V) {
*self = *self + rhs;
}
}
impl<V, const D: usize> ops::Sub<V> for Point<D>
where
V: Into<Vector<D>>,