#![allow(bad_style)] //! Tests methods to change vectors to other length vectors use hektor::*; #[test] fn Vec2_to_vec3() { let v2 = Vec2::new(1.0, 2.0); let v3 = v2.to_vec3(3.0); assert_eq!(Vec3::new(1.0, 2.0, 3.0), v3); } #[test] fn Vec3_to_vec2() { let v3 = Vec3::new(1.0, 2.0, 3.0); let v2 = v3.to_vec2(); assert_eq!(Vec2::new(1.0, 2.0), v2); } #[test] fn Vec3_to_vec4() { let v3 = Vec3::new(1.0, 2.0, 3.0); let v4 = v3.to_vec4(4.0); assert_eq!(Vec4::new(1.0, 2.0, 3.0, 4.0), v4); } #[test] fn Vec4_to_vec3() { let v4 = Vec4::new(1.0, 2.0, 3.0, 4.0); let v3 = v4.to_vec3(); assert_eq!(Vec3::new(1.0, 2.0, 3.0), v3); }