improve coverage of unitOrthogonal

This commit is contained in:
Gael Guennebaud 2009-09-07 12:53:25 +02:00
parent b56bb441dd
commit fb5f546161

View File

@ -86,10 +86,10 @@ template<typename Scalar, int Size> void orthomethods(int size=Size)
VERIFY_IS_MUCH_SMALLER_THAN(v0.unitOrthogonal().dot(v0), Scalar(1));
VERIFY_IS_APPROX(v0.unitOrthogonal().norm(), RealScalar(1));
if (size>3)
if (size>=3)
{
v0.template start<3>().setZero();
v0.end(size-3).setRandom();
v0.template start<2>().setZero();
v0.end(size-2).setRandom();
VERIFY_IS_MUCH_SMALLER_THAN(v0.unitOrthogonal().dot(v0), Scalar(1));
VERIFY_IS_APPROX(v0.unitOrthogonal().norm(), RealScalar(1));