#![allow(bad_style)] #![allow(clippy::float_cmp)] use hektor::*; #[test] fn Vec3_xx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec2 = v.xx(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.x()); } #[test] fn Vec3_xxx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.xxx(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.x()); assert_eq!(v_swizzled.z(), v.x()); } #[test] fn Vec3_xxy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.xxy(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.x()); assert_eq!(v_swizzled.z(), v.y()); } #[test] fn Vec3_xxz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.xxz(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.x()); assert_eq!(v_swizzled.z(), v.z()); } #[test] fn Vec3_xy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec2 = v.xy(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.y()); } #[test] fn Vec3_xyx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.xyx(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.y()); assert_eq!(v_swizzled.z(), v.x()); } #[test] fn Vec3_xyy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.xyy(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.y()); assert_eq!(v_swizzled.z(), v.y()); } #[test] fn Vec3_xyz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.xyz(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.y()); assert_eq!(v_swizzled.z(), v.z()); } #[test] fn Vec3_xz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec2 = v.xz(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.z()); } #[test] fn Vec3_xzx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.xzx(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.z()); assert_eq!(v_swizzled.z(), v.x()); } #[test] fn Vec3_xzy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.xzy(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.z()); assert_eq!(v_swizzled.z(), v.y()); } #[test] fn Vec3_xzz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.xzz(); assert_eq!(v_swizzled.x(), v.x()); assert_eq!(v_swizzled.y(), v.z()); assert_eq!(v_swizzled.z(), v.z()); } #[test] fn Vec3_yx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec2 = v.yx(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.x()); } #[test] fn Vec3_yxx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.yxx(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.x()); assert_eq!(v_swizzled.z(), v.x()); } #[test] fn Vec3_yxy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.yxy(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.x()); assert_eq!(v_swizzled.z(), v.y()); } #[test] fn Vec3_yxz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.yxz(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.x()); assert_eq!(v_swizzled.z(), v.z()); } #[test] fn Vec3_yy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec2 = v.yy(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.y()); } #[test] fn Vec3_yyx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.yyx(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.y()); assert_eq!(v_swizzled.z(), v.x()); } #[test] fn Vec3_yyy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.yyy(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.y()); assert_eq!(v_swizzled.z(), v.y()); } #[test] fn Vec3_yyz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.yyz(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.y()); assert_eq!(v_swizzled.z(), v.z()); } #[test] fn Vec3_yz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec2 = v.yz(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.z()); } #[test] fn Vec3_yzx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.yzx(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.z()); assert_eq!(v_swizzled.z(), v.x()); } #[test] fn Vec3_yzy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.yzy(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.z()); assert_eq!(v_swizzled.z(), v.y()); } #[test] fn Vec3_yzz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.yzz(); assert_eq!(v_swizzled.x(), v.y()); assert_eq!(v_swizzled.y(), v.z()); assert_eq!(v_swizzled.z(), v.z()); } #[test] fn Vec3_zx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec2 = v.zx(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.x()); } #[test] fn Vec3_zxx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.zxx(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.x()); assert_eq!(v_swizzled.z(), v.x()); } #[test] fn Vec3_zxy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.zxy(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.x()); assert_eq!(v_swizzled.z(), v.y()); } #[test] fn Vec3_zxz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.zxz(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.x()); assert_eq!(v_swizzled.z(), v.z()); } #[test] fn Vec3_zy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec2 = v.zy(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.y()); } #[test] fn Vec3_zyx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.zyx(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.y()); assert_eq!(v_swizzled.z(), v.x()); } #[test] fn Vec3_zyy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.zyy(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.y()); assert_eq!(v_swizzled.z(), v.y()); } #[test] fn Vec3_zyz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.zyz(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.y()); assert_eq!(v_swizzled.z(), v.z()); } #[test] fn Vec3_zz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec2 = v.zz(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.z()); } #[test] fn Vec3_zzx() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.zzx(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.z()); assert_eq!(v_swizzled.z(), v.x()); } #[test] fn Vec3_zzy() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.zzy(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.z()); assert_eq!(v_swizzled.z(), v.y()); } #[test] fn Vec3_zzz() { let v = Vec3::new(1.0, 2.0, 3.0); let v_swizzled: Vec3 = v.zzz(); assert_eq!(v_swizzled.x(), v.z()); assert_eq!(v_swizzled.y(), v.z()); assert_eq!(v_swizzled.z(), v.z()); }