Commit 9d955dc
committed
deprecate: UnitQuaternion.interp1's shortest parameter is a no-op
Every UnitQuaternion has a non-negative scalar part by construction
(qunit()), and interp1 always interpolates from the identity
quaternion, whose dot product with any unit quaternion is just that
quaternion's own scalar part. The negative-dot-product condition
`shortest` checks for to detect "the long way round" can therefore
never occur here -- confirmed empirically (2000 random compositions,
plus explicit UnitQuaternion([-1,0,0,0]) construction, all canonicalize
to non-negative scalar part).
Drops the dead branch, warns on shortest=True, documents why in a
docstring note, and pins the no-op behavior (identical results for
True/False, warns only when True) with a regression test.1 parent 8b83c1f commit 9d955dc
2 files changed
Lines changed: 50 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
1978 | 1979 | | |
1979 | 1980 | | |
1980 | 1981 | | |
1981 | | - | |
| 1982 | + | |
1982 | 1983 | | |
1983 | 1984 | | |
1984 | 1985 | | |
| |||
2009 | 2010 | | |
2010 | 2011 | | |
2011 | 2012 | | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
2012 | 2027 | | |
2013 | 2028 | | |
2014 | 2029 | | |
2015 | 2030 | | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
2016 | 2039 | | |
2017 | 2040 | | |
2018 | 2041 | | |
| |||
2022 | 2045 | | |
2023 | 2046 | | |
2024 | 2047 | | |
2025 | | - | |
2026 | | - | |
2027 | | - | |
2028 | | - | |
2029 | | - | |
2030 | | - | |
2031 | | - | |
2032 | | - | |
2033 | 2048 | | |
2034 | 2049 | | |
2035 | 2050 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
701 | 702 | | |
702 | 703 | | |
703 | 704 | | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
704 | 730 | | |
705 | 731 | | |
706 | 732 | | |
| |||
0 commit comments