From f31e800755d84bc38d169b6668a86abdb2fe9a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Mon, 25 Feb 2019 12:21:38 +0200 Subject: [PATCH] Fix to irot3.isclose() Former-commit-id: 5628e48141dac6dcc9726da999b6004b6cb445c9 --- qpms/qpms_c.pyx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qpms/qpms_c.pyx b/qpms/qpms_c.pyx index f4b9cff..0fb5630 100644 --- a/qpms/qpms_c.pyx +++ b/qpms/qpms_c.pyx @@ -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) + )