mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 10:58:28 +00:00
Implement Neg
for Vector
This commit is contained in:
parent
60864e75a5
commit
337957caf6
@ -106,6 +106,14 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<const D: usize> ops::Neg for Vector<D> {
|
||||
type Output = Self;
|
||||
|
||||
fn neg(self) -> Self::Output {
|
||||
self * -1.
|
||||
}
|
||||
}
|
||||
|
||||
impl<V, const D: usize> ops::Sub<V> for Vector<D>
|
||||
where
|
||||
V: Into<Vector<D>>,
|
||||
|
Loading…
Reference in New Issue
Block a user