I realised this approach is wrong.
I must do the quaternion sorting in otherway, probably using a separate tree for each component (then what?). Former-commit-id: 6de715751ddd41f6ffc72b274cadf58a765b3edd
This commit is contained in:
parent
1b63d75153
commit
b939b1c177
|
@ -7,7 +7,9 @@
|
|||
if ((a) > (b)) return 1;\
|
||||
}
|
||||
|
||||
// THIS IS NUMERICALLY UNSTABLE! FIXME!!!!!!
|
||||
int qpms_pg_irot3_cmp(const qpms_irot3_t *p1, const qpms_irot3_t *p2) {
|
||||
QPMS_WARN("NUMERICALLY UNSTABLE! DON'T USE ME!")
|
||||
PAIRCMP(p1->det, p2->det);
|
||||
const qpms_quat_t r1 = qpms_quat_standardise(p1->rot), r2 = qpms_quat_standardise(p2->rot);
|
||||
PAIRCMP(creal(r1.a), creal(r2.a));
|
||||
|
|
|
@ -99,6 +99,8 @@ static inline bool qpms_quat_isclose(const qpms_quat_t p, const qpms_quat_t q, d
|
|||
|
||||
/// "Standardises" a quaternion to have the largest component "positive".
|
||||
/**
|
||||
* FIXME
|
||||
* NUMERICALLY UNSTABLE. DON'T USE
|
||||
* This is to remove the ambiguity stemming from the double cover of SO(3).
|
||||
*/
|
||||
static inline qpms_quat_t qpms_quat_standardise(qpms_quat_t p) {
|
||||
|
|
Loading…
Reference in New Issue