diff --git a/fixed_wide_vectors/src/macros/matrix.rs b/fixed_wide_vectors/src/macros/matrix.rs index 518315b..71ec8e7 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 fc28750..8a0fe4e 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] + } + } + } } }