diff --git a/experiments/2025-03-18/src/math/point.rs b/experiments/2025-03-18/src/math/point.rs index 1f5a19ce3..270a5bb9b 100644 --- a/experiments/2025-03-18/src/math/point.rs +++ b/experiments/2025-03-18/src/math/point.rs @@ -1,49 +1 @@ -use std::ops; - -use fj_math::Vector; - -#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)] -pub struct Point { - pub coords: Vector, -} - -impl From for Point -where - V: Into>, -{ - fn from(coords: V) -> Self { - Self { - coords: coords.into(), - } - } -} - -impl ops::Add for Point -where - V: Into>, -{ - type Output = Self; - - fn add(self, other: V) -> Self::Output { - let other = other.into(); - let coords = self.coords + other; - Self { coords } - } -} - -impl ops::Sub> for Point { - type Output = Vector; - - fn sub(self, other: Point) -> Self::Output { - self.coords - other.coords - } -} - -impl ops::Sub> for Point { - type Output = Point; - - fn sub(self, other: Vector) -> Self::Output { - let coords = self.coords - other; - Self { coords } - } -} +pub use fj_math::Point;