diff --git a/fixed_wide_vectors/src/macros/matrix.rs b/fixed_wide_vectors/src/macros/matrix.rs index 518315bf..71ec8e7b 100644 --- a/fixed_wide_vectors/src/macros/matrix.rs +++ b/fixed_wide_vectors/src/macros/matrix.rs @@ -2,7 +2,11 @@ #[macro_export(local_inner_macros)] macro_rules! impl_matrix { () => { - //$crate::impl_common!(); + impl Matrix{ + pub const fn new(array:[[T;Y];X])->Self{ + Self{array} + } + } } } diff --git a/fixed_wide_vectors/src/macros/vector.rs b/fixed_wide_vectors/src/macros/vector.rs index fc287504..8a0fe4e1 100644 --- a/fixed_wide_vectors/src/macros/vector.rs +++ b/fixed_wide_vectors/src/macros/vector.rs @@ -2,7 +2,18 @@ #[macro_export(local_inner_macros)] macro_rules! impl_vector { () => { - //$crate::impl_common!(); + impl Vector{ + pub const fn new(array:[T;N])->Self{ + Self{array} + } + } + impl Vector{ + pub const fn from_value(value:T)->Self{ + Self{ + array:[value;N] + } + } + } } }