Fix to irot3.isclose()

Former-commit-id: 5628e48141dac6dcc9726da999b6004b6cb445c9
This commit is contained in:
Marek Nečada 2019-02-25 12:21:38 +02:00
parent fe3f8e8c88
commit f31e800755
1 changed files with 5 additions and 1 deletions

View File

@ -855,5 +855,9 @@ cdef class irot3:
'''
if self.det != other.det:
return False
return self.rot.isclose(other.rot, rtol=rtol, atol=atol)
return (self.rot.isclose(other.rot, rtol=rtol, atol=atol)
# unit quaternions are a double cover of SO(3), i.e.
# minus the same quaternion represents the same rotation
or self.rot.isclose(-(other.rot), rtol=rtol, atol=atol)
)