forked from M-Labs/nalgebra
Fix Column implementation generating an ICE.
This commit is contained in:
parent
d3bed841f8
commit
429bcbf9c3
@ -84,7 +84,7 @@ macro_rules! column_impl(
|
|||||||
if i == Dim::dim::<$t<N>>()
|
if i == Dim::dim::<$t<N>>()
|
||||||
{ break }
|
{ break }
|
||||||
|
|
||||||
self.at((i, col)) = copy *e;
|
self.set((i, col), copy *e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@ use traits::inv::Inv;
|
|||||||
#[test]
|
#[test]
|
||||||
use traits::rotation::{Rotation, Rotatable};
|
use traits::rotation::{Rotation, Rotatable};
|
||||||
#[test]
|
#[test]
|
||||||
|
use traits::indexable::Indexable;
|
||||||
|
#[test]
|
||||||
|
use traits::transpose::Transpose;
|
||||||
|
#[test]
|
||||||
use vec::Vec1;
|
use vec::Vec1;
|
||||||
#[test]
|
#[test]
|
||||||
use mat::{Mat1, Mat2, Mat3};
|
use mat::{Mat1, Mat2, Mat3};
|
||||||
@ -54,3 +58,11 @@ fn test_rotation2()
|
|||||||
assert!(randmat.rotated(ang).rotation().approx_eq(ang));
|
assert!(randmat.rotated(ang).rotation().approx_eq(ang));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_index_mat2()
|
||||||
|
{
|
||||||
|
let mat: Mat2<f64> = random();
|
||||||
|
|
||||||
|
assert!(mat.at((0, 1)) == mat.transposed().at((1, 0)));
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user