Linear algebra library for Rust.
Go to file
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
.github Test nalgebra-macros on CI 2021-05-03 13:52:34 +02:00
benches Use correct feature and remove unused import 2021-04-29 20:57:27 -03:00
examples Fix some clippy warnings 2021-08-28 12:05:21 -04:00
nalgebra-glm Forward conversion features 2021-09-30 19:30:53 +02:00
nalgebra-lapack Bump the version of nalgebra-glm, nalgebra-lapack, and nalgebra-sparse. 2021-08-08 18:07:34 +02:00
nalgebra-macros Release v0.29.0 2021-08-08 17:54:35 +02:00
nalgebra-sparse Bring apply permutation function back to serial.rs 2021-10-20 20:28:38 +02:00
src Don't panic ScLERPing UnitDualQuaternion with equal rotation 2021-10-28 00:02:20 -04:00
tests Don't panic ScLERPing UnitDualQuaternion with equal rotation 2021-10-28 00:02:20 -04:00
.gitignore .gitignore: add proptest-regressions to the ignored list. 2021-02-28 18:40:33 +01:00
Cargo.toml Add support for conversion with glam 0.18 2021-08-30 18:31:21 +02:00
CHANGELOG.md Implement Default for most geometry types 2021-10-14 11:39:22 +02:00
clippy.toml Fix some warnings 2021-07-27 19:24:55 -04:00
LICENSE Switch license to Apache v2.0 + update sponsor link. 2020-08-19 19:48:16 +02:00
Makefile Add compare feature to tests run by Makefile 2020-06-29 19:07:44 +02:00
README.md Fix compilation after rebase. 2021-04-11 13:53:45 +02:00
rustfmt.toml Fix some warnings 2021-07-27 19:24:55 -04:00

crates.io

Build status crates.io

Users guide | Documentation | Forum


Linear algebra library for the Rust programming language.


Platinum sponsors

Rapier is supported by: