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. |
||
---|---|---|
.github | ||
benches | ||
examples | ||
nalgebra-glm | ||
nalgebra-lapack | ||
nalgebra-macros | ||
nalgebra-sparse | ||
src | ||
tests | ||
.gitignore | ||
CHANGELOG.md | ||
Cargo.toml | ||
LICENSE | ||
Makefile | ||
README.md | ||
clippy.toml | ||
rustfmt.toml |
README.md
Users guide | Documentation | Forum
Linear algebra library for the Rust programming language.
Platinum sponsors
Rapier is supported by: