| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 469b5fa commit 5d1044a
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1376,7 +1376,9 @@ def trlog( | |||
| 1376 | 1376 | return skew(w * theta) | |
| 1377 | 1377 | else: | |
| 1378 | 1378 | # general case | |
| 1379 | - theta = math.acos((np.trace(R) - 1) / 2) | ||
| 1379 | + tr = (np.trace(R) - 1) / 2 | ||
| 1380 | + # min for inaccuracies near identity yielding trace > 3 | ||
| 1381 | + theta = math.acos(min(tr, 1.0)) | ||
| 1380 | 1382 | st = math.sin(theta) | |
| 1381 | 1383 | if st == 0: | |
| 1382 | 1384 | if twist: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments