mirror of
https://github.com/hannobraun/Fornjot
synced 2025-11-03 13:47:12 +00:00
Implement Sub between two Points
This commit is contained in:
parent
a2cc0f7699
commit
878f6051bc
@ -30,3 +30,15 @@ where
|
||||
Self { coords }
|
||||
}
|
||||
}
|
||||
|
||||
impl<P, const D: usize> ops::Sub<P> for Point<D>
|
||||
where
|
||||
P: Into<Point<D>>,
|
||||
{
|
||||
type Output = Vector<D>;
|
||||
|
||||
fn sub(self, other: P) -> Self::Output {
|
||||
let other = other.into();
|
||||
self.coords - other.coords
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user