From George Papagiannakis, added extra Quat length to catch case

where length is zero.
This commit is contained in:
Robert Osfield 2004-09-13 14:33:41 +00:00
parent b664c20c74
commit 63f8935afb

View File

@ -66,7 +66,7 @@ void Matrix_implementation::set(const Quat& q_in)
{
Quat q(q_in);
double length2 = q.length2();
if (length2!=1.0)
if (length2!=1.0 && length2!=0)
{
// normalize quat if required.
q /= sqrt(length2);