Implement MulAssign for Vector

This commit is contained in:
Hanno Braun 2023-02-15 14:39:36 +01:00
parent f00be2b290
commit b4c1775234

View File

@ -323,6 +323,15 @@ where
} }
} }
impl<S, const D: usize> ops::MulAssign<S> for Vector<D>
where
S: Into<Scalar>,
{
fn mul_assign(&mut self, rhs: S) {
*self = *self * rhs;
}
}
impl<S, const D: usize> ops::Div<S> for Vector<D> impl<S, const D: usize> ops::Div<S> for Vector<D>
where where
S: Into<Scalar>, S: Into<Scalar>,