Commit Graph

356 Commits

Author SHA1 Message Date
Sébastien Crozet
1079f0c1c3 Add a non-const version of Point::new when the cuda feature is enabled 2022-09-24 09:50:58 +02:00
Sébastien Crozet
0fcf2f61d2
Merge pull request #1112 from SolraBizna/point-construction-const-fn
Make "Point::new" a const fn
2022-08-14 15:03:09 +02:00
Sébastien Crozet
d0d88f1e82
Merge pull request #1113 from trueb2/user/trueb2/fix-unitcomplex-assertion
Fix UnitComplex cast doctest failure on macOS
2022-07-30 17:33:13 +02:00
Tim Taubner
0c2d9deac7 cargo fmt 2022-07-27 11:44:42 +02:00
Tim Taubner
7aadbcf21d From_rotation_matrix: Use the larger of eps.sqrt() or eps*eps as disturbance. Add tests for eps > 1.0 2022-07-27 11:31:43 +02:00
Sébastien Crozet
26e69863e1 Rotation from matrix: small code cleanups 2022-07-27 09:49:16 +02:00
Tim Taubner
d515e4f1be Perturbations to check for convergence into maximum. 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
Jacob Trueb
0cdf3ce452 Fix UnitComplex cast doctest failure on macOS 2022-05-25 17:51:19 -05:00
Solra Bizna
4d968da1ad
Make "Point::new" a const fn 2022-05-25 16:42:18 -06:00
Sébastien Crozet
e913beca88 Switch to derive macros for rkyv and bytecheck 2022-04-30 10:47:30 +02:00
zyansheep
24b97932e1 add bytecheck impls 2022-04-30 10:36:39 +02:00
zyansheep
90f2603de4 upgrade rkyv to 0.7 2022-04-30 10:36:39 +02:00
Sébastien Crozet
96d4d98811
Merge pull request #1094 from jsmith628/complex-slerp-fix
fix for `UnitComplex::slerp()` #1093
2022-04-26 18:26:27 +02:00
Joshua Smith
b02e4ec2a9 fixed cargo fmt error 2022-03-26 17:32:12 -05:00
Sébastien Crozet
77cf2c935f
Merge pull request #1096 from sterlingjensen/cleanupdoc
Cleanup examples and doc links
2022-03-24 10:00:24 +01:00
sterlingjensen
724117e5ad Cleanup examples and doc links
Close example code fences and normalize containing head line in touched files.
Remove stale reference to `slice_assume_init` (commit 8c6ebf27), fix long dead internal links in deprecation notices.
2022-03-22 12:03:18 -05:00
Joshua Smith
27a349d282 fix for UnitComplex::slerp() #1093 2022-03-21 16:08:53 -05:00
Sébastien Crozet
d7117e228a Use cust_core instead of cust 2022-03-16 18:07:29 +01:00
Ben Kimock
698e130c3b Remove abomonation support
Abomonation has numerous soundness problems which have been
well-documented in its issue tracker for over 2 years. Some of them
could be fixed, but some are fundamental to its design. If a user wants
super-fast ser/de, they should use rkyv.
2022-02-05 17:15:08 -05:00
Sébastien Crozet
9297cc5754 Implement DeviceCopy for UnitComplex, UnitQuaternion, and Unit<Matrix> instead of using a blanket impl 2021-11-26 18:13:37 +01:00
Sébastien Crozet
9d897a6b8a Add support for rust-cuda 2021-11-23 12:03:11 +01:00
Terence
0ecbed512b cargo fmt 2021-11-20 09:12:45 -05:00
Terence
3df81c7cc9 fix docs 2021-10-28 00:05:50 -04: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
Sébastien Crozet
e05bfe48b3
Merge pull request #1012 from Yuri6037/scale
Scale
2021-10-25 10:20:07 +02:00
Sébastien Crozet
4be7db36fd
Remove useless into_owned. 2021-10-25 09:57:58 +02:00
Yuri Edward
209f77ccaf Fixed from_superset_unchecked 2021-10-24 22:26:01 +02:00
Yuri Edward
25dba52197 Removed additional into_owned call 2021-10-24 21:58:05 +02:00
Yuri Edward
54b8a5b900 Rollbacked buggy update 2021-10-24 21:55:11 +02:00
Yuri Edward
50f65123b5 Merge branch 'scale' of github.com:Yuri6037/nalgebra into scale 2021-10-24 21:52:45 +02:00
Yuri6037
b8800ccd15
Update src/geometry/scale_conversion.rs
Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-10-24 21:52:35 +02:00
Yuri Edward
9d2639b742 Removed clippy suspicious_arithmetic_impl allow 2021-10-24 21:51:36 +02:00
Yuri Edward
866cabaa28 Merge remote-tracking branch 'origin/scale' into scale 2021-10-24 20:55:35 +02:00
Yuri Edward
6d3978b212 Added Scale *= scalar + reordered ops 2021-10-24 20:55:10 +02:00
Yuri Edward
0aba533556 Added Scale * Vector 2021-10-24 20:45:40 +02:00
Yuri6037
8efa9f76b7
Update src/geometry/scale_coordinates.rs
Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-10-24 20:41:27 +02:00
Yuri6037
510ffcbb18
Update src/geometry/scale_coordinates.rs
Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-10-24 20:41:21 +02:00
Yuri Edward
c11e1ffb4d Fixed missing curly bracket 2021-10-24 20:40:02 +02:00
Yuri6037
ded853757c
Update src/geometry/scale.rs
Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-10-24 20:31:35 +02:00
Yuri6037
f7eec7317c
Update src/geometry/scale_conversion.rs
Removed return.

Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-10-24 20:27:54 +02:00
Yuri6037
5b44502632
Update src/geometry/scale.rs
Simplified code.

Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-10-24 20:27:38 +02:00
Yuri6037
26e36c15ba
Update src/geometry/scale.rs
Removed return

Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-10-24 20:25:48 +02:00
Yuri6037
6123c86f9e
Update src/geometry/scale.rs
Removed return

Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-10-24 20:24:16 +02:00
Yuri6037
91b8424a86
Update src/geometry/scale.rs
Removed return

Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-10-24 20:21:07 +02:00
Yuri6037
de41c42af7
Update src/geometry/scale.rs
Simplified code

Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
2021-10-24 20:20:13 +02:00
Yuri Edward
b91ead7971 Fixed Subset for Matrix 2021-10-21 15:56:07 +02:00
Yuri Edward
4466fb2514 Added point * vector 2021-10-21 15:47:00 +02:00
Yuri Edward
99704a0ea1 Updated all examples related to inversion API 2021-10-21 15:22:18 +02:00
Yuri Edward
82b8ac84a0 Fixed code formatting 2021-10-21 15:10:26 +02:00