mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 10:58:28 +00:00
Implement Neg
for Scalar
This commit is contained in:
parent
cc3a852bbe
commit
828326441e
@ -73,6 +73,15 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl ops::Neg for Scalar {
|
||||
type Output = Self;
|
||||
|
||||
fn neg(self) -> Self::Output {
|
||||
let value = -self.value();
|
||||
Self::new(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl<S> ops::Sub<S> for Scalar
|
||||
where
|
||||
S: Into<Scalar>,
|
||||
|
Loading…
Reference in New Issue
Block a user