From George Papagiannakis, added extra Quat length to catch case
where length is zero.
This commit is contained in:
parent
b664c20c74
commit
63f8935afb
@ -66,7 +66,7 @@ void Matrix_implementation::set(const Quat& q_in)
|
|||||||
{
|
{
|
||||||
Quat q(q_in);
|
Quat q(q_in);
|
||||||
double length2 = q.length2();
|
double length2 = q.length2();
|
||||||
if (length2!=1.0)
|
if (length2!=1.0 && length2!=0)
|
||||||
{
|
{
|
||||||
// normalize quat if required.
|
// normalize quat if required.
|
||||||
q /= sqrt(length2);
|
q /= sqrt(length2);
|
||||||
|
Loading…
Reference in New Issue
Block a user