mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-04 01:48:28 +00:00
Implement Scalar
multiplication
This commit is contained in:
parent
a5fc856b00
commit
b01ebd326a
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user