mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-07 19:38:29 +00:00
Implement SubAssign
for Point
This commit is contained in:
parent
1236513539
commit
996d704fd7
@ -200,6 +200,15 @@ impl<const D: usize> ops::Sub<Point<D>> for &Point<D> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<V, const D: usize> ops::SubAssign<V> for Point<D>
|
||||
where
|
||||
V: Into<Vector<D>>,
|
||||
{
|
||||
fn sub_assign(&mut self, v: V) {
|
||||
*self = *self - v.into();
|
||||
}
|
||||
}
|
||||
|
||||
impl<const D: usize> fmt::Debug for Point<D> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.coords.fmt(f)
|
||||
|
Loading…
Reference in New Issue
Block a user