COMP: transform : split off operations

This commit is contained in:
mattijs
2010-12-15 15:35:50 +00:00
parent 9293486dd9
commit 957f8d9d70

View File

@ -48,9 +48,11 @@ inline tensor rotationTensor
const vector& n2
)
{
const scalar s = n1 & n2;
const vector n3 = n1 ^ n2;
return
(n1 & n2)*I
+ (1 - (n1 & n2))*sqr(n1 ^ n2)/(magSqr(n1 ^ n2) + VSMALL)
s*I
+ (1 - s)*sqr(n3)/(magSqr(n3) + VSMALL)
+ (n2*n1 - n1*n2);
}