diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/point.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/point.rs b/core/src/point.rs index 2b5ad154..a31bf967 100644 --- a/core/src/point.rs +++ b/core/src/point.rs @@ -67,3 +67,11 @@ impl std::ops::Sub<Vector> for Point { } } } + +impl std::ops::Sub<Point> for Point { + type Output = Vector; + + fn sub(self, point: Point) -> Vector { + Vector::new(self.x - point.x, self.y - point.y) + } +} |