[Bf-committers] Normalise patch

Martin Poirier theeth at yahoo.com
Fri Feb 10 00:36:22 CET 2006



--- Nathan Vegdahl <cessen at cessen.com> wrote:

> > With that change, instead of having to check if
> the
> > result of the normalise is a null vector, we'd
> have to
> > check beforehand to see if it's lower than a
> certain
> > threshold (since the rest of the operations on
> that
> > vector will be on a magic value, hence, wrong).
> 
>     Actually, it's still very quick and easy to
> check.  No before-hand 
> annoyances or thresholds involved.  It's even
> *easier* than checking if 
> the resulting vector is null, as you suggested.  In
> fact, the way you 
> check it is *exactly* the same as you would have
> before my modification 
> (or at least should have):
>     The Normalise function returns a floating point
> number.  If it's 
> zero, then the vector wasn't properly normalised.

Ah yes, I forgot about the return value. Still, I find
that a bit silly that normalise would return a length
of 0 yet set the vector to a non-null value.

Martin

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Bf-committers mailing list