matrix: from_rows
This commit is contained in:
parent
10e56fb0b9
commit
ec82745c6d
@ -12,6 +12,13 @@ macro_rules! impl_matrix {
|
||||
self.array
|
||||
}
|
||||
#[inline]
|
||||
pub fn from_rows(rows:[Vector<X,T>;Y])->Self
|
||||
{
|
||||
Matrix::new(
|
||||
rows.map(|row|row.array),
|
||||
)
|
||||
}
|
||||
#[inline]
|
||||
pub fn map<F,U>(self,f:F)->Matrix<X,Y,U>
|
||||
where
|
||||
F:Fn(T)->U
|
||||
|
Loading…
Reference in New Issue
Block a user