mirror of
https://github.com/hannobraun/Fornjot
synced 2025-11-02 05:08:08 +00:00
Avoid generics in Sub implementation for Point
Otherwise, it's going to conflict with the second Point-Vector implementation that I'm about to add.
This commit is contained in:
parent
10a2036740
commit
8be6b041aa
@ -31,14 +31,10 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<P, const D: usize> ops::Sub<P> for Point<D>
|
impl<const D: usize> ops::Sub<Point<D>> for Point<D> {
|
||||||
where
|
|
||||||
P: Into<Point<D>>,
|
|
||||||
{
|
|
||||||
type Output = Vector<D>;
|
type Output = Vector<D>;
|
||||||
|
|
||||||
fn sub(self, other: P) -> Self::Output {
|
fn sub(self, other: Point<D>) -> Self::Output {
|
||||||
let other = other.into();
|
|
||||||
self.coords - other.coords
|
self.coords - other.coords
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user