diff --git a/src/geometry/point_construction.rs b/src/geometry/point_construction.rs index 8f06629f..2282354f 100644 --- a/src/geometry/point_construction.rs +++ b/src/geometry/point_construction.rs @@ -125,3 +125,15 @@ componentwise_constructors_impl!( U5, x:0, y:1, z:2, w:3, a:4; U6, x:0, y:1, z:2, w:3, a:4, b:5; ); + +macro_rules! from_array_impl( + ($($D: ty, $len: expr);*) => {$( + impl From <[N; $len]> for Point { + fn from (coords : [N; $len]) -> Self { + Point::from_coordinates(coords.into()) + } + } + )*} +); + +from_array_impl!(U1,1; U2,2; U3,3; U4,4; U5,5; U6,6);