diff --git a/tests/geometry/rotation.rs b/tests/geometry/rotation.rs index a823418d..7c0834cb 100644 --- a/tests/geometry/rotation.rs +++ b/tests/geometry/rotation.rs @@ -102,6 +102,53 @@ mod proptest_tests { }; } + macro_rules! gen_powf_180deg_rotation_test { + ($( + fn $powf_rot_n:ident($($v:ident in $vec:ident()),*); + )*) => {$( + proptest! { + + #[test] + fn $powf_rot_n($($v in $vec(),)*) { + + use nalgebra::*; + use num_traits::Zero; + use std::f64::consts::PI; + + //an array of tuples with the unit plane and angle + let plane_angles = gen_rotation_planes!($($v),*).iter().map( + |b| Unit::try_new_and_get(*b,0.0).map_or_else( + || (Matrix::zero(), 0.0), + |(b,a)| (b.into_inner(), a) + ) + ).collect::>(); + + //loop over every choice of between the original angle and swapping to 180 deg + let n = plane_angles.len(); + for mask in 0..(1<