diff options
Diffstat (limited to 'core/src/point.rs')
-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 9bf7726b..d351befd 100644 --- a/core/src/point.rs +++ b/core/src/point.rs @@ -75,3 +75,11 @@ impl std::ops::Sub<Point> for Point { Vector::new(self.x - point.x, self.y - point.y) } } + +impl std::ops::Add<Point> for Point { + type Output = Point; + + fn add(self, point: Point) -> Point { + Point::new(self.x + point.x, self.y + point.y) + } +} |