dfb7b6af22
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. |
||
---|---|---|
.. | ||
dual_quaternion.rs | ||
isometry.rs | ||
mod.rs | ||
point.rs | ||
projection.rs | ||
quaternion.rs | ||
rotation.rs | ||
similarity.rs | ||
unit_complex.rs |