nalgebra/tests/geometry
Terence dfb7b6af22 Don't panic ScLERPing UnitDualQuaternion with equal rotation
Solves #1013.

Previously, when screw-linearly interpolating two unit dual quaternions
that had an identical orientation, `try_sclerp` would return `None`, as
the operation would introduce a division-by-zero.

This PR splits out the cases where two unit dual quaternions have an
identical orientation from the cases where they have opposite
orientations. In the case where they have identical orientations, the
operation is well-defined, but the exponential parameterization could
not handle it without introducing NaNs. Therefore, the function detects
this case and simply defaults to linearly interpolating the
translational components and using one of the two inputs' rotation
components.

The case where the inputs have opposite rotations is now detected
separately using the dot product of the real (rotation) parts, which was
already being computed anyway.

Also introduces proptests for these specific scenarios, to avoid any
regression.
2021-10-28 00:02:20 -04:00
..
dual_quaternion.rs Don't panic ScLERPing UnitDualQuaternion with equal rotation 2021-10-28 00:02:20 -04:00
isometry.rs Use proptest for all nalgebra tests. 2021-02-28 17:52:14 +01:00
mod.rs rustfmt 2021-01-28 18:46:14 -05:00
point.rs Use proptest for all nalgebra tests. 2021-02-28 17:52:14 +01:00
projection.rs Use proptest for all nalgebra tests. 2021-02-28 17:52:14 +01:00
quaternion.rs Use proptest for all nalgebra tests. 2021-02-28 17:52:14 +01:00
rotation.rs Use proptest for all nalgebra tests. 2021-02-28 17:52:14 +01:00
similarity.rs Use proptest for all nalgebra tests. 2021-02-28 17:52:14 +01:00
unit_complex.rs Use proptest for all nalgebra tests. 2021-02-28 17:52:14 +01:00