diff --git a/experiments/2024-12-09/src/math/point.rs b/experiments/2024-12-09/src/math/point.rs index d9ca6b9df..a111c507c 100644 --- a/experiments/2024-12-09/src/math/point.rs +++ b/experiments/2024-12-09/src/math/point.rs @@ -4,12 +4,12 @@ use super::Vector; #[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)] pub struct Point { - pub coords: Vector, + pub coords: Vector<3>, } impl From for Point where - T: Into, + T: Into>, { fn from(coords: T) -> Self { Self { @@ -20,7 +20,7 @@ where impl ops::Add for Point where - T: Into, + T: Into>, { type Output = Self; diff --git a/experiments/2024-12-09/src/math/vector.rs b/experiments/2024-12-09/src/math/vector.rs index f706dc34a..338ed0934 100644 --- a/experiments/2024-12-09/src/math/vector.rs +++ b/experiments/2024-12-09/src/math/vector.rs @@ -5,11 +5,11 @@ use iter_fixed::IntoIteratorFixed; use super::Scalar; #[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)] -pub struct Vector { - pub components: [Scalar; 3], +pub struct Vector { + pub components: [Scalar; D], } -impl From<[S; 3]> for Vector +impl From<[S; 3]> for Vector<3> where S: Into, { @@ -20,9 +20,9 @@ where } } -impl ops::Add for Vector +impl ops::Add for Vector<3> where - T: Into, + T: Into>, { type Output = Self;