Skip to content
Snippets Groups Projects
Commit bf4b92f1 authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

cover the case normV==0

[[Imported from SVN: r741]]
parent 6861311e
Branches
No related tags found
No related merge requests found
......@@ -17,6 +17,10 @@ public:
T normV = std::sqrt(v0*v0 + v1*v1 + v2*v2);
T sin = std::sin(normV/2)/normV;
// if normV == 0 then q = (0,0,0,1)
if (isnan(sin))
sin = 0;
q[0] = sin * v0;
q[1] = sin * v1;
q[2] = sin * v2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment