diff --git a/src/tests/mat.rs b/src/tests/mat.rs index 45124236..fca18dd0 100644 --- a/src/tests/mat.rs +++ b/src/tests/mat.rs @@ -1,5 +1,5 @@ #[test] -use core::num::{One}; +use core::num::{One, abs}; #[test] use core::rand::{random}; #[test] @@ -9,11 +9,17 @@ use std::cmp::FuzzyEq; #[test] use traits::inv::Inv; #[test] +use traits::rotation::Rotation; +#[test] +use dim1::vec1::vec1; +#[test] use dim1::mat1::Mat1; #[test] use dim2::mat2::Mat2; #[test] use dim3::mat3::Mat3; +#[test] +use adaptors::rotmat::Rotmat; // #[test] // use traits::dim::d7; @@ -60,6 +66,13 @@ fn test_inv_mat3() } #[test] -fn test_rot2() +fn test_rotation2() { + for uint::range(0u, 10000u) |_| + { + let randmat = One::one::>>(); + let ang = &vec1(abs::(random()) % f64::consts::pi); + + assert!(randmat.rotated(ang).rotation().fuzzy_eq(ang)); + } }