we build
This commit is contained in:
parent
e026f6efed
commit
56b781fcb8
@ -2,7 +2,11 @@
|
||||
#[macro_export(local_inner_macros)]
|
||||
macro_rules! impl_matrix {
|
||||
() => {
|
||||
//$crate::impl_common!();
|
||||
impl<const X:usize,const Y:usize,T> Matrix<X,Y,T>{
|
||||
pub const fn new(array:[[T;Y];X])->Self{
|
||||
Self{array}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,18 @@
|
||||
#[macro_export(local_inner_macros)]
|
||||
macro_rules! impl_vector {
|
||||
() => {
|
||||
//$crate::impl_common!();
|
||||
impl<const N:usize,T> Vector<N,T>{
|
||||
pub const fn new(array:[T;N])->Self{
|
||||
Self{array}
|
||||
}
|
||||
}
|
||||
impl<const N:usize,T:Copy> Vector<N,T>{
|
||||
pub const fn from_value(value:T)->Self{
|
||||
Self{
|
||||
array:[value;N]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user