fix vectorization logic and code of cross3 which was never enabled..

This commit is contained in:
Gael Guennebaud
2010-09-08 14:10:01 +02:00
parent f9123df772
commit 91e9344be9
3 changed files with 5 additions and 4 deletions

View File

@@ -399,7 +399,8 @@ QuaternionBase<Derived>::_transformVector(Vector3 v) const
// It appears to be much faster than the common algorithm found
// in the litterature (30 versus 39 flops). It also requires two
// Vector3 as temporaries.
Vector3 uv = Scalar(2) * this->vec().cross(v);
Vector3 uv = this->vec().cross(v);
uv += uv;
return v + this->w() * uv + this->vec().cross(uv);
}