Implement Scalar multiplication

This commit is contained in:
Hanno Braun 2024-12-17 20:40:37 +01:00
parent a5fc856b00
commit b01ebd326a

View File

@ -60,3 +60,15 @@ where
Self::new(value)
}
}
impl<S> ops::Mul<S> for Scalar
where
S: Into<Scalar>,
{
type Output = Self;
fn mul(self, other: S) -> Self::Output {
let value = self.value() * other.into().value();
Self::new(value)
}
}