Skip to content
Snippets Groups Projects
Commit bf2fd07b authored by Kelvin's avatar Kelvin
Browse files

revert the revert

parent 9e39926a
No related branches found
No related tags found
No related merge requests found
......@@ -198,23 +198,23 @@ class TimeDependentRotation:
"""
quats = self._rots.as_quat()
# # First find the largest magnitude quaternion coefficient and its coordinate
# num_quats = len(quats)
# max_q = 0.0
# max_j = 0
# for i in range(num_quats):
# for j in range(4):
# if abs(quats[i][j]) > abs(max_q):
# max_q = quats[i][j]
# max_j = j
# # Ensure the signs are consistent
# qcnt = 0
# for i in range(num_quats):
# if quats[i][max_j] * max_q < 0:
# qcnt = qcnt + 1
# for j in range(4):
# quats[i][j] *= -1.0
# First find the largest magnitude quaternion coefficient and its coordinate
num_quats = len(quats)
max_q = 0.0
max_j = 0
for i in range(num_quats):
for j in range(4):
if abs(quats[i][j]) > abs(max_q):
max_q = quats[i][j]
max_j = j
# Ensure the signs are consistent
qcnt = 0
for i in range(num_quats):
if quats[i][max_j] * max_q < 0:
qcnt = qcnt + 1
for j in range(4):
quats[i][j] *= -1.0
return quats
......
......@@ -339,10 +339,10 @@
],
"quaternions": [
[
-0.08339426680875163,
0.2825790922154143,
-0.2899354389711647,
0.9105667982826637
0.08339426680875163,
-0.2825790922154143,
0.2899354389711647,
-0.9105667982826637
],
[
-0.05753008804150366,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment