Commit 4ba94f7
committed
helix_orient: normalize input in angle_error_deg (codex P2)
encode() accepts non-unit input, but the round-trip angular error is cos⁻¹ of the
dot of two UNIT directions. decode() already returns a unit vector; normalize the
input too, else a scaled vector (e.g. [2,0,0]) clamps the dot to 1.0 → reports 0°
and short vectors report inflated errors, making the codec-quality diagnostic
meaningless. Lib tests (incl. three_byte_is_sub_tenth_degree) green on 1.95.1 parent eb0b7df commit 4ba94f7
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
161 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
| |||
0 commit comments