Repository navigation
Commit babe57a
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 824a459 commit babe57a
2 files changed
Lines changed: 51 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
2073 | 2074 | | |
2074 | 2075 | | |
2075 | 2076 | | |
2076 | | - | |
| 2077 | + | |
2077 | 2078 | | |
2078 | 2079 | | |
2079 | 2080 | | |
| |||
2104 | 2105 | | |
2105 | 2106 | | |
2106 | 2107 | | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
2107 | 2122 | | |
2108 | 2123 | | |
2109 | 2124 | | |
2110 | 2125 | | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
2111 | 2134 | | |
2112 | 2135 | | |
2113 | 2136 | | |
2114 | 2137 | | |
2115 | 2138 | | |
2116 | 2139 | | |
2117 | | - | |
2118 | | - | |
2119 | | - | |
| 2140 | + | |
2120 | 2141 | | |
2121 | 2142 | | |
2122 | 2143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
783 | 784 | | |
784 | 785 | | |
785 | 786 | | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
786 | 812 | | |
787 | 813 | | |
788 | 814 | | |
| |||
0 commit comments