I've just spent some considerable time debugging a unit test of mine and started seriously questioning myself until I found out that I created a random transformation via
Eigen::AngleAxis<double> rotation(random_angle, Vector3d::Random());
It turned out that this rotation is not norm preserving - well my fault since I initialized it the wrong way. ;)
I am just wondering whether we should add run-time asserts to classes which require unit vectors as inputs. If I remember correctly this also applies to the Quaternion class.
So far, I would add this assert to
a) AngleAxis<double>(const Scalar& angle, const MatrixBase<Derived>& axis)
b) Quaternion(const Scalar& w, const Scalar& x, const Scalar& y, const Scalar& z)
Maybe even AngleAxis(const MatrixBase<Derived>& m) deserves a test. I am not sure what happens, when anything but a rotation matrix is passed to the class.