#![allow(bad_style)] use hektor::*; #[test] fn Mat2_to_mat3() { let m2 = Mat2::diagonal(1.0, 2.0); let m3 = m2.to_mat3(3.0); assert_eq!(Mat3::diagonal(1.0, 2.0, 3.0), m3); } #[test] fn Mat3_to_mat2() { let m3 = Mat3::diagonal(1.0, 2.0, 3.0); let m2 = m3.to_mat2(); assert_eq!(Mat2::diagonal(1.0, 2.0), m2); } #[test] fn Mat3_to_mat4() { let m3 = Mat3::diagonal(1.0, 2.0, 3.0); let m4 = m3.to_mat4(4.0); assert_eq!(Mat4::diagonal(1.0, 2.0, 3.0, 4.0), m4); } #[test] fn Mat4_to_mat3() { let m4 = Mat4::diagonal(1.0, 2.0, 3.0, 4.0); let m3 = m4.to_mat3(); assert_eq!(Mat3::diagonal(1.0, 2.0, 3.0), m3); }