Quaternion and AngleAxis should check their input
Submitted by Gael Guennebaud @ggael
Assigned to Nobody
Link to original bugzilla bug (#601)
Version: 3.2
Description
Created attachment 337
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:
sqrt(NumTraits<Scalar>::dummy_precision())
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.
Attachment 337, "Proposed patch":
geo_input_checks.patch
Depends on
Blocking
Edited by Eigen Bugzilla