Commit 957f8d9d authored by mattijs's avatar mattijs
Browse files

COMP: transform : split off operations

parent 9293486d
...@@ -48,9 +48,11 @@ inline tensor rotationTensor ...@@ -48,9 +48,11 @@ inline tensor rotationTensor
const vector& n2 const vector& n2
) )
{ {
const scalar s = n1 & n2;
const vector n3 = n1 ^ n2;
return return
(n1 & n2)*I s*I
+ (1 - (n1 & n2))*sqr(n1 ^ n2)/(magSqr(n1 ^ n2) + VSMALL) + (1 - s)*sqr(n3)/(magSqr(n3) + VSMALL)
+ (n2*n1 - n1*n2); + (n2*n1 - n1*n2);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment