fix quats some more

This commit is contained in:
David Rose 2002-06-21 23:39:42 +00:00
parent 4a75e0e995
commit 17ff77a87f
1 changed files with 2 additions and 3 deletions

View File

@ -55,9 +55,8 @@ INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LQuaternion)::
xform(const FLOATNAME(LVecBase3) &v) const {
FLOATNAME(LQuaternion) v_quat(0.0f, v[0], v[1], v[2]);
FLOATNAME(LQuaternion) inv;
inv.invert_from(*this);
v_quat = inv * v_quat * (*this);
FLOATNAME(LQuaternion) inv(_v.data[0], -_v.data[1], -_v.data[2], -_v.data[3]);
v_quat = (*this) * v_quat * inv;
return FLOATNAME(LVecBase3)(v_quat[1], v_quat[2], v_quat[3]);
}