|
From: Roger H. <rog...@mi...> - 2004-07-22 12:58:15
|
James' change of Q3Vector3D_Length to Q3FastVector3D_Length before comparing with 1.0 (with a tolerance) made me wonder why we need to do the square root. Why not call Q3FastVector2D_LengthSquared instead? The square of something close to one must be close to one. ( 1 + delta ) ^2 = 1 + 2 * delta + delta^2. As we are using the floating point epsilon, delta^2 is insignificant, so we just need to compare with a new constant of 2 * kQ3RealZero. By the way, I think the name kQ3RealZero is a bit misleading. Real zero is zero, kQ3RealZero is just a small number. How about kQ3AlmostZero? Roger. |