#![allow(bad_style)] #![allow(clippy::float_cmp)] use hektor::*; #[test] fn Vec2_xx() { let v = Vec2::new(1.0, 2.0); let v_swizzled = v.xx(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.x()); } #[test] fn Vec2_xy() { let v = Vec2::new(1.0, 2.0); let v_swizzled = v.xy(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.y()); } #[test] fn Vec2_yx() { let v = Vec2::new(1.0, 2.0); let v_swizzled = v.yx(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.x()); } #[test] fn Vec2_yy() { let v = Vec2::new(1.0, 2.0); let v_swizzled = v.yy(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.y()); }