#![allow(bad_style)] #![allow(clippy::float_cmp)] //! "Vec Mul-vec" sounds like a dumb DnD villain use hektor::*; #[test] fn Vec2_mul_Vec2() { let v1 = Vec2::new(1.0, 2.0); let v2 = Vec2::new(8.0, -6.5); // assert_eq!(v1 * v2, Vec2::new(v1.x() * v2.x(), v1.y() * v2.y())); } #[test] fn Vec3_mul_Vec3() { let v1 = Vec3::new(1.0, 2.0, 3.0); let v2 = Vec3::new(8.0, -6.5, 7.0); // assert_eq!( v1 * v2, Vec3::new(v1.x() * v2.x(), v1.y() * v2.y(), v1.z() * v2.z()) ); } #[test] fn Vec4_mul_Vec4() { let v1 = Vec4::new(1.0, 2.0, 3.0, 4.0); let v2 = Vec4::new(8.0, -6.5, 7.0, 0.0); // assert_eq!( v1 * v2, Vec4::new( v1.x() * v2.x(), v1.y() * v2.y(), v1.z() * v2.z(), v1.w() * v2.w() ) ); }