[cgkit-commits] cgkit2/supportlib/include quat.h,1.1.1.1,1.2
Brought to you by:
mbaas
From: Matthias B. <mb...@us...> - 2004-12-23 12:15:09
|
Update of /cvsroot/cgkit/cgkit2/supportlib/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27299/include Modified Files: quat.h Log Message: Added an epsilon environment to a comparison which fixes some incorrect transformations that often occur when the FPU is in single mode (as used by DirectX) Index: quat.h =================================================================== RCS file: /cvsroot/cgkit/cgkit2/supportlib/include/quat.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** quat.h 12 Dec 2004 14:32:21 -0000 1.1.1.1 --- quat.h 23 Dec 2004 12:14:55 -0000 1.2 *************** *** 384,388 **** t = m11+m22+m33+1.0; ! if (t>0.0) { s = 0.5/sqrt(t); --- 384,388 ---- t = m11+m22+m33+1.0; ! if (t>vec3<T>::epsilon) { s = 0.5/sqrt(t); *************** *** 394,400 **** else { - // ad1 = xabs(m11); - // ad2 = xabs(m22); - // ad3 = xabs(m33); ad1 = m11; ad2 = m22; --- 394,397 ---- |