This bugzilla service is closed. All entries have been migrated to

Bug 601

Summary: Quaternion and AngleAxis should check their input
Product: Eigen Reporter: Gael Guennebaud <gael.guennebaud>
Component: GeometryAssignee: Nobody <eigen.nobody>
Status: DECISIONNEEDED ---    
Severity: API Change CC: chtz, gael.guennebaud, hauke.heibel, jacob.benoit.1
Priority: Low    
Version: 3.2   
Hardware: All   
OS: All   
Bug Depends on: 560    
Bug Blocks: 1608    
Description Flags
Proposed patch none

Description Gael Guennebaud 2013-05-17 10:29:41 UTC
Created attachment 337 [details]
Proposed patch

As discussed on the mailing list, some of the ctors/members of AngleAxis and Quaternion assume either unit vectors of matrices. The attached patch does exactly that with a very high tolerance to reduce the risk of false negatives:


Such a high threshold was needed to be compatible with fast normalization routines that are very inaccurate.

There was discussion on whether this threshold should be configurable by the user. Sounds overkill to me.
Comment 1 Christoph Hertzberg 2013-05-17 11:18:22 UTC
As said on the mailing list, my only concern with that patch is that it breaks functionality for those few users who use quaternions in a general algebraic way.
I made this bug depend on bug 560 and block 3.2 (although 560 does not need to block 3.2, but the API decision should be made).

I agree on the non-configurability.
Also the proposed threshold seems fine to me. Users working with double and requiring less precision should switch to single precision anyways.
Comment 2 Gael Guennebaud 2013-06-10 10:51:21 UTC
since this concerns API decision, let's defer it for 3.3 as I'd like to release 3.2 asap.
Comment 3 Gael Guennebaud 2015-03-06 18:47:50 UTC
Related issue on the forum:
Comment 4 Gael Guennebaud 2016-01-30 21:43:19 UTC
Still no consensus -> 3.4
Comment 5 Nobody 2019-12-04 12:19:29 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: