mirror of
https://github.com/hannobraun/Fornjot
synced 2025-08-12 12:16:05 +00:00
Implement Scalar
multiplication
This commit is contained in:
parent
a5fc856b00
commit
b01ebd326a
@ -60,3 +60,15 @@ where
|
|||||||
Self::new(value)
|
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…
x
Reference in New Issue
Block a user