summaryrefslogtreecommitdiff
path: root/src/geometry/point.rs
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2022-04-19 21:27:56 +0200
committerJustin Wernick <justin@worthe-it.co.za>2022-04-19 21:27:56 +0200
commit3f5492b2bb67326be43cd7c5ba02ccf0ba1ae0e3 (patch)
tree96963ba885a9393106b4a88ffc4266203e87582e /src/geometry/point.rs
parent4ceec65b088f05d4ad03f9ac70b1d63452fd8197 (diff)
Refile for merging repos
Diffstat (limited to 'src/geometry/point.rs')
-rw-r--r--src/geometry/point.rs37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/geometry/point.rs b/src/geometry/point.rs
deleted file mode 100644
index 1ab9b36..0000000
--- a/src/geometry/point.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-use crate::geometry::vec::*;
-
-use std::ops::*;
-
-#[derive(Debug, Default, Clone, Copy, Hash, PartialEq, Eq)]
-pub struct Point2d {
- pub x: i8,
- pub y: i8,
-}
-
-impl Point2d {
- pub fn new(x: i8, y: i8) -> Point2d {
- Point2d { x, y }
- }
-}
-
-impl Add<Vec2d> for Point2d {
- type Output = Self;
-
- fn add(self, other: Vec2d) -> Self {
- Point2d {
- x: self.x.saturating_add(other.x),
- y: self.y.saturating_add(other.y),
- }
- }
-}
-
-impl Sub for Point2d {
- type Output = Vec2d;
-
- fn sub(self, other: Self) -> Vec2d {
- Vec2d {
- x: self.x.saturating_sub(other.x),
- y: self.y.saturating_sub(other.y),
- }
- }
-}