[ODE] Length calculation

Oleh Derevenko oder at eleks.lviv.ua
Thu Oct 11 09:28:22 MST 2007

Performance penalty would be two comparisons (with two branching instructions) + two divisions (or a division and two multiplications, if reciprocal of largest vector component is calculated).

Oleh Derevenko
-- ICQ: 36361783

  ----- Original Message ----- 
  From: Bram Stolk 
  To: Oleh Derevenko 
  Cc: ode at ode.org 
  Sent: 11 жовтня 2007 р. 19:20
  Subject: Re: [ODE] Length calculation

  What would the performance penalty be?
  A lot of lengths calculations do not need to be fancier.
  I think that e.g. all triangle edge lengths are ok?


  On 10/11/07, Oleh Derevenko <oder at eleks.lviv.ua> 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?

    Oleh Derevenko
    -- ICQ: 36361783

    ODE mailing list
    ODE at ode.org

  Zapp: Captain's log, stardate...er..
  Kif: Ohhh. April 13th.
  Zapp: April 13th. Point 2. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ode.org/pipermail/ode/attachments/20071011/577e3633/attachment.htm

More information about the ODE mailing list