[ODE] Length calculation

Jon Watte (ODE) hplus-ode at mindcontrol.org
Thu Oct 11 09:38:47 MST 2007

Oleh Derevenko wrote:
> Did not you think about changing dLength3() to use the same approach 
> as dNormalize3() does? If there is a noticeable error in vector length 
> after straight normalization via division by square root of vector 
> component squares sum, that error comes from length calculation and 
> hence, is present in result of dLength3().
> What about calculating a vector length as product of largest vector 
> component by length of vector after division by that largest component?

If you do a simple floating point error analysis, you'll quickly realize 
that that will just introduce more errors. The reason you can do better 
in normalize, is that the target (1.0) is well known and well defined.


          / h+

More information about the ODE mailing list