Commit Graph

37 Commits

Author SHA1 Message Date
Tim Taubner 257d95b3d3 Add test case for issue 1078 2022-07-27 09:49:16 +02:00
Tim Taubner f9aa2d76aa Start from random rotation in from_matrix to prevent issues when calling from_matrix on rotation matrices 2022-07-27 09:49:16 +02:00
Joshua Smith 96e2d1f69e fixed cargo fmt 2022-03-29 13:42:38 -05:00
Joshua Smith baa320d7f3 added tests for complex and quaternion slerp pathing 2022-03-29 13:38:10 -05:00
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
Crozet Sébastien 6cfd2bca14 Use proptest for all nalgebra tests. 2021-02-28 17:52:14 +01:00
Sébastien Crozet fa2e025a1e
Merge pull request #824 from tpdickso/dual_quaternion
Implement additional `DualQuaternion` ops and `UnitDualQuaternion`
2021-02-25 15:46:34 +01:00
Crozet Sébastien 7d5cc4912d Update cargo badge and categories. 2021-01-29 13:33:37 +01:00
Terence 8c52e4dfdc rustfmt 2021-01-28 19:29:12 -05:00
Terence ac92e68486 add new operators 2021-01-28 19:27:40 -05:00
Terence ecda74f6b2 clippify 2021-01-28 18:50:34 -05:00
Terence 388b77108e rustfmt 2021-01-28 18:46:14 -05:00
Terence 6be0365203 add integration test 2021-01-28 18:45:34 -05:00
Crozet Sébastien 67603be6ed Fix the PartialEq impl for quaternions.
The double-covering property should only be taken into account for `UnitQuaternion` instead of `Quaternion` itself.
2020-12-18 11:38:33 +01:00
sebcrozet f782060e99 Fix trailing commas in tests. 2020-04-05 20:36:26 +02:00
sebcrozet bbb3be512e Run cargo fmt. 2020-04-05 18:49:48 +02:00
sebcrozet 691f58b622 Fix compilation of tests. 2020-04-05 18:33:03 +02:00
sebcrozet f8cd26cfa9 Replace alga by simba. 2020-03-21 12:16:46 +01:00
sebcrozet cfb654240c Matrix::transform_point: correctly take the normalization term into account.
Fix #640
2019-08-27 22:05:28 +02:00
sebcrozet 18b9f82042 Fix warnings. 2019-03-31 13:32:26 +02:00
sebcrozet 4ef4001836 Rename Real to RealField. 2019-03-25 11:21:41 +01:00
sebcrozet 77f048b6b9 WIP use Complex instead of Real whenever possible on the linalg module. 2019-03-02 19:33:49 +01:00
sebcrozet fc24db8ff3 Merge branch 'master-public' into sparse
# Conflicts:
#	Cargo.toml
#	examples/matrix_construction.rs
#	nalgebra-glm/src/constructors.rs
#	nalgebra-glm/src/ext/matrix_clip_space.rs
#	nalgebra-glm/src/ext/matrix_transform.rs
#	nalgebra-glm/src/ext/mod.rs
#	nalgebra-glm/src/ext/quaternion_common.rs
#	nalgebra-glm/src/gtx/quaternion.rs
#	nalgebra-glm/src/gtx/rotate_vector.rs
#	nalgebra-glm/src/lib.rs
#	nalgebra-glm/src/traits.rs
#	nalgebra-lapack/src/cholesky.rs
#	nalgebra-lapack/src/eigen.rs
#	nalgebra-lapack/src/hessenberg.rs
#	nalgebra-lapack/src/lu.rs
#	nalgebra-lapack/src/qr.rs
#	nalgebra-lapack/src/schur.rs
#	nalgebra-lapack/src/svd.rs
#	nalgebra-lapack/src/symmetric_eigen.rs
#	rustfmt.toml
#	src/base/array_storage.rs
#	src/base/blas.rs
#	src/base/cg.rs
#	src/base/default_allocator.rs
#	src/base/edition.rs
#	src/base/iter.rs
#	src/base/matrix.rs
#	src/base/swizzle.rs
#	src/base/vec_storage.rs
#	src/geometry/mod.rs
#	src/geometry/point_construction.rs
#	src/geometry/quaternion.rs
#	src/geometry/similarity.rs
#	src/geometry/translation.rs
#	src/geometry/unit_complex_construction.rs
#	src/linalg/bidiagonal.rs
#	src/linalg/cholesky.rs
#	src/linalg/full_piv_lu.rs
#	src/linalg/hessenberg.rs
#	src/linalg/lu.rs
#	src/linalg/permutation_sequence.rs
#	src/linalg/qr.rs
#	src/linalg/schur.rs
#	src/linalg/svd.rs
#	src/linalg/symmetric_eigen.rs
#	src/linalg/symmetric_tridiagonal.rs
#	tests/geometry/point.rs
#	tests/geometry/quaternion.rs
#	tests/lib.rs
#	tests/linalg/eigen.rs
#	tests/linalg/svd.rs
2019-02-03 12:53:41 +01:00
Gedl 3fdcf5329d Rename ::new_observer_frame to ::face_towards 2019-01-16 22:41:25 +01:00
sebcrozet f36ff97d6a Fix deprecation warnings. 2018-12-29 13:19:09 +01:00
Jack Wrenn 0d47a8e16b Rename `Perspective3::unwrap` to `Perspective3::into_inner` and deprecate `Perspective3::unwrap`
See #460
2018-12-16 12:58:20 +01:00
Jack Wrenn 9600c45dd4 Rename `Orthographic3::unwrap` to `Orthographic3::into_inner` and deprecate `Orthographic3::unwrap`
See #460
2018-12-16 12:58:20 +01:00
sebcrozet c69ab193be Fix cornercase for Rotation3 conversion to euler angles.
Fix #494
2018-12-04 22:04:07 +01:00
sebcrozet 8341ec2f10 Run rustfmt. 2018-11-06 18:32:20 +01:00
sebcrozet 98b0b842e9 Remove the inherent clone method from points.
Fix #458.
2018-11-01 10:22:10 +01:00
sebcrozet 14ad10a7e0 Add rustfmt.toml and run it. 2018-10-27 15:00:18 +02:00
sebcrozet 0d24cf4dc0 Run rustmt. 2018-10-20 22:26:44 +02:00
Eduard Bopp bba1993e58 Restructure test modules to avoid warnings
These warnings occurred only when running the test suite with no
features. Lots of uses had to be rescoped into newly created modules to
make it easier to separate these issues.
2018-01-18 13:13:38 +01:00
Eduard Bopp 5b2e383320 Let the test suite run with no features 2018-01-18 13:13:38 +01:00
Jack Wrenn 922b339fb0 Implement to_euler_angles for Rotation3 and UnitQuaternion
Resolves sebcrozet/nalgebra#243.
2018-01-09 15:15:57 -05:00
Sébastien Crozet 48f80d99cc Fix abomonation integration. 2017-08-15 19:36:38 +02:00
Sébastien Crozet 3f70af97dd Add the most common matrix decompositions. 2017-08-15 19:07:18 +02:00