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:
Hanno Braun 2025-01-09 18:38:05 +01:00
parent 10a2036740
commit 8be6b041aa

View File

@ -31,14 +31,10 @@ where
}
}
impl<P, const D: usize> ops::Sub<P> for Point<D>
where
P: Into<Point<D>>,
{
impl<const D: usize> ops::Sub<Point<D>> for Point<D> {
type Output = Vector<D>;
fn sub(self, other: P) -> Self::Output {
let other = other.into();
fn sub(self, other: Point<D>) -> Self::Output {
self.coords - other.coords
}
}