mirror of
https://github.com/hannobraun/Fornjot
synced 2025-08-07 01:36:07 +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
|
impl<S> ops::Sub<S> for Scalar
|
||||||
where
|
where
|
||||||
S: Into<Scalar>,
|
S: Into<Scalar>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user