Update core.py
This commit is contained in:
parent
b5525b0f4e
commit
2e6e4ebb22
|
|
@ -178,6 +178,9 @@ def MatrixLog3(R):
|
||||||
elif acosinput < -1:
|
elif acosinput < -1:
|
||||||
acosinput = -1
|
acosinput = -1
|
||||||
theta = np.arccos(acosinput)
|
theta = np.arccos(acosinput)
|
||||||
|
if theta == 0:
|
||||||
|
return (R - np.array(R).T)/2
|
||||||
|
else:
|
||||||
return theta / 2.0 / np.sin(theta) * (R - np.array(R).T)
|
return theta / 2.0 / np.sin(theta) * (R - np.array(R).T)
|
||||||
|
|
||||||
def RpToTrans(R, p):
|
def RpToTrans(R, p):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue